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

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>
Subject: Re: pgsql: Add support for hyperbolic functions, as well as log10().
Date: 2019-03-14 08:28:16
Message-ID: CAEZATCVOhaAjPwmBideyiu-W7QUH=W1j2UAVmTP0fJqKDbLpWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, 14 Mar 2019 at 04:41, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> > I'm amazed that jacana's asinh() returned -0 for an input of +0.
>
> Even more amusingly, it returns NaN for acosh('infinity'), cf
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2019-03-14%2003%3A00%3A34
>
> Presumably that means they calculated "infinity - infinity" at some
> point, but why?
>

Given the -0 result, I don't find that particularly surprising. I
suspect lots of formulae would end up doing that without proper
special-case handling upfront.

It looks like that's the only platform that isn't POSIX compliant
though, so maybe it's not worth worrying about.

Regards,
Dean

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-03-14 12:37:04 pgsql: Refactor ParamListInfo initialization
Previous Message Peter Eisentraut 2019-03-14 07:46:59 pgsql: Fix volatile vs. pointer confusion

Browse pgsql-hackers by date

  From Date Subject
Next Message Imai, Yoshikazu 2019-03-14 08:35:09 RE: speeding up planning with partitions
Previous Message Amit Langote 2019-03-14 08:18:29 Re: why doesn't DestroyPartitionDirectory hash_destroy?