Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCuWX-0006SF-Gu for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Apr 2018 22:10:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fCuWW-0008OX-8h for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Apr 2018 22:10:24 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCuWW-0008OF-1U; Sun, 29 Apr 2018 22:10:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCuWT-0007wn-2Y; Sun, 29 Apr 2018 22:10:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w3TMAHPV004592; Sun, 29 Apr 2018 18:10:17 -0400 From: Tom Lane To: David Rowley cc: Huong Dangminh , Euler Taveira , "pgsql-bugs@lists.postgresql.org" , Pg Hackers , Akio Iwaasa Subject: Re: power() function in Windows: "value out of range: underflow" In-reply-to: References: <75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp> <75DB81BEEA95B445AE6D576A0A5C9E936A73F5DD@BPXM05GP.gisp.nec.co.jp> <22149.1525029880@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Mon, 30 Apr 2018 09:59:06 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4590.1525039817.1@sss.pgh.pa.us> Date: Sun, 29 Apr 2018 18:10:17 -0400 Message-ID: <4591.1525039817@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > I wonder if it's better just to hard code these two cases before even > calling the pow() function. Yeah, see my followup --- I also found out that SUSv2 (POSIX 1997) doesn't require either of these special cases, which helps explain why the inconsistency on older platforms. Hacking on a patch now. regards, tom lane