Re: pgsql: Add support for hyperbolic functions, as well as log10().

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-13T02:21:59Z
Lists: pgsql-hackers
On Tue, Mar 12, 2019 at 07:55:14PM +0000, Tom Lane wrote:
> Add support for hyperbolic functions, as well as log10().
> 
> The SQL:2016 standard adds support for the hyperbolic functions
> sinh(), cosh(), and tanh().  POSIX has long required libm to
> provide those functions as well as their inverses asinh(),
> acosh(), atanh().  Hence, let's just expose the libm functions
> to the SQL level.  As with the trig functions, we only implement
> versions for float8, not numeric.

jacana is not a fan of this commit, and failed on float8:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2019-03-13%2000%3A00%3A27
@@ -476,7 +476,7 @@
SELECT asinh(float8 '0');
 asinh
-------
-     0
+    -0
(1 row)
--
Michael

Commits

  1. Further adjust the tests for the hyperbolic functions.

  2. Adjust the tests for the hyperbolic functions.

  3. Rethink how to test the hyperbolic functions.

  4. Add support for hyperbolic functions, as well as log10().