Re: exp() versus the POSIX standard

Emre Hasegeli <emre@hasegeli.com>

From: Emre Hasegeli <emre@hasegeli.com>
To: Darafei Komяpa Praliaskouski <me@komzpa.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-06-12T15:34:15Z
Lists: pgsql-hackers
> No, no kind of GUC switch is needed. Just drop underflow/overflow checks. You'll get 0 or Infinity in expected places, and infinities are okay since 2007.

This is out of scope of this thread.  I am not sure opening it to
discussion on another thread would yield any result.  Experienced
developers like Tom appear to be in agreement of us needing to protect
users from oddities of floating point numbers.  (I am not.)



Commits

  1. Fix behavior of exp() and power() for infinity inputs.

  2. Fix float4/8 to handle Infinity and Nan consistently, e.g. Infinity is a

  3. Cleanup.