Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Date: 2019-03-11 14:29:53
Message-ID: 21612.1552314593@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> +1 for including the inverse functions. However, it looks to me like
> the inverse functions are C99-specific, so they might not be available
> on all supported platforms. If they're not, we may need to provide our
> own implementations.

FWIW, I'm pretty sure they're available everywhere. It's true C89
doesn't mention them, but POSIX has had them for a long time. The
SUSv2 version of POSIX has them, and so does my pet dinosaur HPUX 10.20,
which has this to say about their origin:

$ man asinh
...
STANDARDS CONFORMANCE
asinh(): SVID3, XPG4.2

Windows, as usual, is a wild card, but as far as I can tell by googling
they exist in Windows too (at least recent versions).

It's definitely possible that there are substandard implementations
out there, though. Hopefully the buildfarm will alert us to any
problems.

> Of course that may all be moot -- those functions may in fact be
> available everywhere we care about, but it was interesting to play
> around with them anyway.

Yeah, math functions are fun to play around with ... and we could end
up needing the code. We'll see.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Georgios Kokolatos 2019-03-11 14:35:49 Re: Adding a TAP test checking data consistency on standby with minRecoveryPoint
Previous Message Sergei Kornilov 2019-03-11 14:11:11 Re: Offline enabling/disabling of data checksums