Re: Opossum vs. float4 NaN

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, glyn(at)8kb(dot)co(dot)uk
Subject: Re: Opossum vs. float4 NaN
Date: 2019-01-26 16:16:07
Message-ID: 87pnsjjt87.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-26 17:35:31 Re: Allowing extensions to supply operator-/function-specific info
Previous Message Tom Lane 2019-01-26 16:00:05 Opossum vs. float4 NaN