diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-29 18:15:16 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-29 18:15:16 -0400 |
commit | 6bdf1303b34bc630e8945ae3407ec7e8395c8fe5 (patch) | |
tree | 0d03b62e28f5de9103c4be0d0f8852a803eec768 /contrib/jsonb_plperl/jsonb_plperl.c | |
parent | 68e7e973d22274a089ce95200b3782f514f6d2f8 (diff) | |
download | postgresql-6bdf1303b34bc630e8945ae3407ec7e8395c8fe5.tar.gz |
Avoid wrong results for power() with NaN input on more platforms.
Buildfarm results show that the modern POSIX rule that 1 ^ NaN = 1 is not
honored on *BSD until relatively recently, and really old platforms don't
believe that NaN ^ 0 = 1 either. (This is unsurprising, perhaps, since
SUSv2 doesn't require either behavior.) In hopes of getting to platform
independent behavior, let's deal with all the NaN-input cases explicitly
in dpow().
Note that numeric_power() doesn't know either of these special cases.
But since that behavior is platform-independent, I think it should be
addressed separately, and probably not back-patched.
Discussion: https://postgr.es/m/75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp
Diffstat (limited to 'contrib/jsonb_plperl/jsonb_plperl.c')
0 files changed, 0 insertions, 0 deletions