Re: power() function in Windows: "value out of range: underflow"
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>,
Huong Dangminh <huo-dangminh@ys.jp.nec.com>,
Pg Hackers <pgsql-hackers@postgresql.org>,
Akio Iwaasa <aki-iwaasa@vt.jp.nec.com>
Date: 2018-05-01T17:49:18Z
Lists: pgsql-bugs, pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Apr 29, 2018 at 7:24 PM, David Rowley
> <david.rowley@2ndquadrant.com> wrote:
>> I think we should back patch and try to be consistent about the
>> power(float8 1.0, 'NaN') and power('NaN', float8 0.0) cases. The
>> archives don't show any complaints about power() with NaN until this
>> one, so I imagine the number of people affected by this is small.
> I agree that this is not likely to affect a lot of people -- but the
> question isn't how many people will be affected but rather, of those
> that are, how many of them will be pleased rather than displeased by a
> change. I would argue that the results have to be unambiguously wrong
> in the back-branches to justify a change there, and this doesn't
> appear to meet that standard. I would guess that the number of people
> who use NaN is very small, but those people have probably adapted
> their application to the behavior they are getting currently.
The point here, I think, is that you get behavior X on approximately 100%
of modern platforms, but (without this patch) behavior Y on some number of
older platforms. People who have tested their app on a modern platform
and then find that it misbehaves on an old one will think this is a bug
fix. People who only run their app on an old platform may think the
pre-patch behavior is fine, in which case they will indeed be upset if
we change it in a minor release. Are there more of the latter than the
former? I don't really know, and you don't either. But I don't think
we should discount the existence of the former category. Deploying
to production on an older release of $system than you develop on
is hardly an unusual scenario.
regards, tom lane
Commits
-
Revert back-branch changes in power()'s behavior for NaN inputs.
- 99095b632094 9.3.23 landed
- f74d83b3034f 10.4 landed
- eab8d6312f15 9.6.9 landed
- 8fbdd63a52df 9.5.13 landed
- 70211459a507 9.4.18 landed
-
Avoid wrong results for power() with NaN input on more platforms.
- d9c7f56da464 9.3.23 landed
- d6ec3d2375ac 9.6.9 landed
- 9e4caa2748f4 9.5.13 landed
- 6bdf1303b34b 11.0 landed
- 59c2df3ae894 9.4.18 landed
- 217d8f3a19ae 10.4 landed
-
Avoid wrong results for power() with NaN input on some platforms.
- 534267e7f3ea 9.3.23 landed
- 48e0f8cbe0d9 9.6.9 landed
- 44ccd11cbbe6 9.4.18 landed
- 3b7fba935ec0 9.5.13 landed
- 61b200e2f582 11.0 landed
- 4d864de486d6 10.4 landed