Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4H4s-0001hL-JC for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Mar 2019 03:30:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4H4o-0000Qg-U6 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Mar 2019 03:30:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4H4o-0000QO-Mo for pgsql-hackers@lists.postgresql.org; Thu, 14 Mar 2019 03:30:38 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4H4m-0002YP-7M for pgsql-hackers@lists.postgresql.org; Thu, 14 Mar 2019 03:30:38 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x2E3UVuU027223; Thu, 14 Mar 2019 12:30:31 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 7B58AEA7585; Thu, 14 Mar 2019 12:30:31 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 70D68EA7559; Thu, 14 Mar 2019 12:30:31 +0900 (JST) Received: from localhost (unknown [129.60.241.55]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 6B4EF4003FA; Thu, 14 Mar 2019 12:30:31 +0900 (JST) Date: Thu, 14 Mar 2019 12:30:00 +0900 (Tokyo Standard Time) Message-Id: <20190314.123000.211786963.horiguchi.kyotaro@lab.ntt.co.jp> Subject: Re: pgsql: Add support for hyperbolic functions, as well as log10(). From: Kyotaro HORIGUCHI In-Reply-To: <2503.1552533507@sss.pgh.pa.us> References: <17820.1552514192@sss.pgh.pa.us> <2503.1552533507@sss.pgh.pa.us> User-Agent: Mew version 6.5 on Emacs 22.2 / Mule 5.0 =?iso-2022-jp?B?KBskQjpnGyhCKQ==?= / Meadow-3.01-dev (TSUBO-SUMIRE) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: tgl@sss.pgh.pa.us Cc: andrew.dunstan@2ndquadrant.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org, laetitia.avrot@gmail.com X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk At Wed, 13 Mar 2019 23:18:27 -0400, Tom Lane wrote in <2503.1552533507@sss.pgh.pa.us> tgl> Andrew Dunstan 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