Make floating-point "NaN / 0" return NaN instead of raising an error.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Jul 2020 23:44:41 +0000 (19:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Jul 2020 23:44:45 +0000 (19:44 -0400)
commit4fb6aeb4f6e807c8ce3e140d2d2281f50eb6fb1a
treec2045d6b04b1ac5b0190cbd46f280029e8ca78ad
parent6ca7cd89a2d1998b16e8168dda62d43a9e0fdaff
Make floating-point "NaN / 0" return NaN instead of raising an error.

This is more consistent with the IEEE 754 spec and our treatment of
NaNs elsewhere; in particular, the case has always acted that way in
"numeric" arithmetic.

Noted by Dean Rasheed.

Discussion: http://postgr.es/m/3421746.1594927785@sss.pgh.pa.us
src/include/utils/float.h
src/test/regress/expected/float4-misrounded-input.out
src/test/regress/expected/float4.out
src/test/regress/expected/float8.out
src/test/regress/sql/float4.sql
src/test/regress/sql/float8.sql