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

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: andrew(dot)dunstan(at)2ndquadrant(dot)com, michael(at)paquier(dot)xyz, pgsql-hackers(at)lists(dot)postgresql(dot)org, laetitia(dot)avrot(at)gmail(dot)com
Subject: Re: pgsql: Add support for hyperbolic functions, as well as log10().
Date: 2019-03-14 03:30:00
Message-ID: 20190314.123000.211786963.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

At Wed, 13 Mar 2019 23:18:27 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in <2503(dot)1552533507(at)sss(dot)pgh(dot)pa(dot)us>
tgl> Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
tgl> > Or we could possibly call the function and then turn a result of -0 into 0?
tgl>
tgl> But -0 is the correct output if the input is -0. So that approach
tgl> requires distinguishing -0 from 0, which is annoyingly difficult.

I think just turning both of -0 and +0 into +0 works, and, FWIW,
it is what is done in geo_ops.c (e.g. line_construct()) as a kind
of normalization and I think it is legit for geo_ops, but I don't
think so for fundamental functions like (d)asinh().

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-03-14 03:47:14 pgsql: Fix race condition in recently-added TAP test for recovery consi
Previous Message Tom Lane 2019-03-14 03:18:27 Re: pgsql: Add support for hyperbolic functions, as well as log10().

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2019-03-14 03:33:20 RE: Timeout parameters
Previous Message Tom Lane 2019-03-14 03:18:27 Re: pgsql: Add support for hyperbolic functions, as well as log10().