Tom, I'm back with this issue. I have comparied the src/backend/utils/adt/float.c from 7.4.6 against CVS HEAD. There was some work done on the infinity handling (don't know who, I am NOT a CVS expert/user). The problem I see is that the float4in does a check to see if the value is infinity BEFORE calling CheckFloat4Val (this was added for 8.0) but the float4div (and friends) doesn't. All I want to do is add a check in CheckFloat4Val for infinity (and remove the individual checks before the CheckFloat4Val call in other routines).
I hope I have explained my problem and solution. Jim ---------- Forwarded Message ----------- From: "Jim Buttafuoco" <[EMAIL PROTECTED]> To: Tom Lane <[EMAIL PROTECTED]> Cc: "pgsql-hackers" <pgsql-hackers@postgresql.org> Sent: Tue, 1 Feb 2005 17:20:17 -0500 Subject: Re: [HACKERS] float4 regression test failed on linux parisc Tom, The issue is with a select 'Infinity'::float4/'Infinity'::float4; which should return NAN. without the cast I get the overflow message from CheckFloat4Val with the cast I get NAN (as expected). How about testing for isnan() inside CheckFloat4Val (just for PARISC / Linux)? I am trying to get this system working for the buildfarm as there are NO other HP PARISC system on the farm. Jim ---------- Original Message ----------- From: Tom Lane <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: "pgsql-hackers" <pgsql-hackers@postgresql.org> Sent: Tue, 01 Feb 2005 17:13:52 -0500 Subject: Re: [HACKERS] float4 regression test failed on linux parisc > "Jim Buttafuoco" <[EMAIL PROTECTED]> writes: > > Change: > > CheckFloat4Val(result); > > To: > > CheckFloat4Val((float4)result); > > CheckFloat4Val is defined to take a double, so whatever the above is > accomplishing is wrong: probably it's masking an out-of-range result. > I think you've hit a bug in Debian's version of gcc for PA-RISC. > > regards, tom lane ------- End of Original Message ------- ------- End of Forwarded Message ------- ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org