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

Andrew Dunstan <andrew.dunstan@2ndquadrant.com>

From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, laetitia.avrot@gmail.com
Date: 2019-03-14T03:06:51Z
Lists: pgsql-hackers
On 3/13/19 5:56 PM, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Tue, Mar 12, 2019 at 11:16:42PM -0400, Tom Lane wrote:
>>> I'm inclined to leave it as-is for a day or so and see if any
>>> other failures turn up, before deciding what to do about it.
>> Fine by me.
> Well, so far jacana is the only critter that's shown any problem.
>
> I don't find any of the possible solutions to be super attractive:
>
> 1. Put in an explicit special case, along the lines of
>
> 	if (arg1 == 0.0)
> 		result = arg1;    /* Handle 0 and -0 explicitly */
> 	else
> 		result = asinh(arg1);
>
> Aside from being ugly, this'd mean that our regression tests weren't
> really exercising the library asinh function at all.


Or we could possibly call the function and then turn a result of -0 into 0?


cheers


andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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