pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e
Date: Mon, 20 Jul 2020 23:44:54 +0000
Message-ID: <E1jxfSo-0004Y5-8Y@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1jxfSo-0004Y5-8Y@gemulon.postgresql.org>
Permalink:  ../E1jxfSo-0004Y5-8Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jxfSo-0004Y5-8Y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e
  In-Reply-To: <E1jxfSo-0004Y5-8Y@gemulon.postgresql.org>
  References: <E1jxfSo-0004Y5-8Y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox