Обсуждение: pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e

Поиск
Список
Период
Сортировка

pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e

От
Tom Lane
Дата:
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: https://postgr.es/m/3421746.1594927785@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4fb6aeb4f6e807c8ce3e140d2d2281f50eb6fb1a

Modified Files
--------------
src/include/utils/float.h                             | 4 ++--
src/test/regress/expected/float4-misrounded-input.out | 6 ++++++
src/test/regress/expected/float4.out                  | 6 ++++++
src/test/regress/expected/float8.out                  | 6 ++++++
src/test/regress/sql/float4.sql                       | 1 +
src/test/regress/sql/float8.sql                       | 1 +
6 files changed, 22 insertions(+), 2 deletions(-)