Re: Opossum vs. float4 NaN - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Opossum vs. float4 NaN
Date
Msg-id 87pnsjjt87.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Opossum vs. float4 NaN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> The reason that it's reappeared is the refactoring we've done
 Tom> recently around snprintf: float4out is now taking its float4
 Tom> argument and widening it to double to pass to strtod, which is
 Tom> where the checks for Inf/NaN happen.
 [...]
 Tom> to float4out, but ick. I was willing to do cb3e9e40b because it
 Tom> didn't really make the code any uglier, but this would. And I bet
 Tom> the issue is going to cause problems somewhere for Andrew's Ryu
 Tom> patch, too.

Actually I'd expect the reverse - Ryu never widens a float4 to float8,
it does everything in integers after extracting the bits from the value;
so it should be immune to this issue.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Opossum vs. float4 NaN
Next
From: Tom Lane
Date:
Subject: Re: Allowing extensions to supply operator-/function-specific info