Skip site navigation (1) Skip section navigation (2)

Re: float4 regression test failed on linux parisc

From: "Jim Buttafuoco" <jim(at)contactbda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: float4 regression test failed on linux parisc
Date: 2005-02-01 22:06:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Source: CSV HEAD (As of yesterday)
Platform: HP PARISC (HP 710)
OS: Debian Sarge
File: src/backend/utils/adt/float.c

I tested this on my parisc box and it passed all tests.  This could just be an issue with a very old CPU/floating 
point unit.

I can send a patch in, but since this seems to work on other platforms, I thought I would ask here first.

Sorry about the cryptic message, it was before my first cup of java.


        float4          arg1 = PG_GETARG_FLOAT4(0);
        float4          arg2 = PG_GETARG_FLOAT4(1);
        double          result;

        if (arg2 == 0.0)
                                 errmsg("division by zero")));

        /* Do division in float8, then check for overflow */
        result = (float8) arg1 / (float8) arg2;


        PG_RETURN_FLOAT4((float4) result);

---------- Original Message -----------
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim Buttafuoco" <jim(at)contactbda(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Sent: Tue, 01 Feb 2005 12:06:30 -0500
Subject: Re: [HACKERS] float4 regression test failed on linux parisc 

> "Jim Buttafuoco" <jim(at)contactbda(dot)com> writes:
> > I am getting a float4 regression test failure.  I have extracted the SQL from both the float4 and float8 tests 
> > Both should return NAN
> > I looked at the code,  The float4div does the operation as float8's then checks the value.  The value is a valid 
> > float8 NAN.  The call to CheckFloat4Val is missing a cast back to float4.  If I put the cast in I get the expected 
> > results (NAN).
> This report is about as clear as mud :-(.  What platform is this, and
> what source code change are you proposing *exactly* ?
> 			regards, tom lane
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
------- End of Original Message -------

In response to


pgsql-hackers by date

Next:From: Darcy BuskermolenDate: 2005-02-01 22:10:35
Subject: Re: FunctionCallN improvement.
Previous:From: Oleg BartunovDate: 2005-02-01 21:30:37
Subject: Re: Huge memory consumption during vacuum (v.8.0)

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group