Re: pgsql: Add support for hyperbolic functions, as well aslog10(). - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: pgsql: Add support for hyperbolic functions, as well aslog10().
Date
Msg-id 20190314.123000.211786963.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: pgsql: Add support for hyperbolic functions, as well as log10().  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At Wed, 13 Mar 2019 23:18:27 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote in <2503.1552533507@sss.pgh.pa.us>
tgl> Andrew Dunstan <andrew.dunstan@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add support for hyperbolic functions, as well as log10().
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Timeout parameters