Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkg1h-0000v3-Gk for pgsql-committers@arkaria.postgresql.org; Mon, 15 Jun 2020 03:43:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkg1g-0006Zt-Db for pgsql-committers@arkaria.postgresql.org; Mon, 15 Jun 2020 03:43:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkg1e-0006Zm-DN for pgsql-committers@lists.postgresql.org; Mon, 15 Jun 2020 03:43:12 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkg1a-0003Xk-2v for pgsql-committers@lists.postgresql.org; Mon, 15 Jun 2020 03:43:10 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8684E5C00B3; Sun, 14 Jun 2020 23:43:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 14 Jun 2020 23:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=tVGLk2B0J2IUt5pS5sQbymHjT7j MBoLKqzoEubzMruU=; b=iNU0HaDPfarykMwOeRcqLWU7O+WMQonuGobB3V/CS3Q 3kuqQXCLHQ2cxDECNeQ0DfyRJI3exuC68GooxDyCPe4s7GTS2C5+qksCVPofwi5E 7wH8IEADxho5TMXEbrFewkNevIo55LmidhjaJpbvtAdi7gMemcNWF979roStCkRQ CisV6zZa1OZY/ZTF7EaflVO96E3OZM9vnte9DniVFBR4kEtLGoMGUES2L8eG09RW gOCPp/xg1vJk94X2YdjDHCqvxcqeqacYJgD+mly9m+GAdGVCULy7pmtJCYhPIBum TuG//KSLT+az0uHgGFvSeerdP0BgJzR9aPuF4mKGbwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=tVGLk2 B0J2IUt5pS5sQbymHjT7jMBoLKqzoEubzMruU=; b=Gu0Dhm5RVkbaFr/LagPx88 FpAQ0tpBaRds3ytkRtcsVsGxfnKed70bG9MKuyQTd5yC7170n3ASNmkH7B2erGtU 7ZrO3OMEYhSPdH6rxbvQ6/1LXDl2i68I7U+L5rsSPs7mab0vgNuo/WV4wonDyCA4 /VcbURefaf3zzTEGkHfynhh6bctp9TP5p0BdxHeK7jV4cfSXcotMvEG5xx9lg5Z3 9zawT5YSKO315zrkf8ssUbKPNzGgoWhRgZQNkHJ6wkOMl9X0YDsqCXkQGG8zI9FY 8BFTKwohXUsUoCrCILNhdG0hRMndTdo+IkISGeYMZT6JxrqS56iQrm+y3zzeUd3g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeijedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpeffudeffeelgffhkedukeekvedvudfgieetkeekudelfeevhffhffdtudffieeutden ucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeduuddurddutddvrd dukedtrddukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 23B483060F09; Sun, 14 Jun 2020 23:43:01 -0400 (EDT) Date: Mon, 15 Jun 2020 12:42:59 +0900 From: Michael Paquier To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix behavior of exp() and power() for infinity inputs. Message-ID: <20200615034259.GD52676@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o0ZfoUVt4BxPQnbU" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --o0ZfoUVt4BxPQnbU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 14, 2020 at 03:00:11PM +0000, Tom Lane wrote: > Fix behavior of exp() and power() for infinity inputs. >=20 > Previously, these functions tended to throw underflow errors for > negative-infinity exponents. The correct thing per POSIX is to > return 0, so let's do that instead. (Note that the SQL standard > is silent on such issues, as it lacks the concepts of either Inf > or NaN; so our practice is to follow POSIX whenever a corresponding > C-library function exists.) >=20 > Also, add a bunch of test cases verifying that exp() and power() > actually do follow POSIX for Inf and NaN inputs. While this patch > should guarantee that exp() passes the tests, power() will not unless > the platform's pow(3) is fully POSIX-compliant. I already know that > gaur fails some of the tests, and I am suspicious that the Windows > animals will too; the extent of compliance of other old platforms > remains to be seen. We might choose to drop failing test cases, or > to work harder at overriding pow(3) for these cases, but first let's > see just how good or bad the situation is. The Windows servers don't actually cay anything here, but sidewinder and hoverfly complain, on top of gaur of course: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dhoverfly&dt=3D202= 0-06-14%2015%3A05%3A33 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dsidewinder&dt=3D2= 020-06-14%2018%3A45%3A28 -- Michael --o0ZfoUVt4BxPQnbU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl7m7kMACgkQnvQgOdby QH0/chAAkhxyp4zC027nI3gbcqpHJ0GE9Ii8xfPc6/QxMjI68yUBBUKvOgADZPxT /bxdDu8nOmzBMldRyQuepwhhXhoKitylYdLv96V7QMJd3mZ76YN+9z+Ol3/P22rq 7IaIuYk77NXLf9mKeHnLxwORUPrlPYtWJ7i0SERBUoVUEFLHfgkRug4fdO63lp61 jstJjr8EVj8tbwwYbplZpTHsRaRqjbuQvreYfHAWKYMWvAWdBgPKrK2+OEaf341+ eRweM85mpV/kl0T8ayGq+5uPNXHBnkdswuZuLv/maQwliJZT9T5CL/+QTj7/ksnE ItP1O9I8qlbvkRtcbdgdtXXr06ad9X8OSRyRxWlo3awh7b8duf7AtZL8dc6lSUWM +6VVJaxroCgrf5+3XH3OSc5FF9Z7+IZB2EY2HaU9duNEUobGQgPLQt600u5Kt69+ VpZt4ZWq2/s5BrfOO2gjTnMLq8y6jRXrC79+XacHVCxx0UXsQvBZYm8js9lrPPfp e5RQP3G3WXCYe8Rmm48g9cqBI4UD0rSZyhJ988WRDcdVCUCKWL2xqRFHH6qKLUoy Zh9z80JPyfDkrjjHLWEAmOf1AWB6pVqwWsU9HLqs489yHrYq0e7EgOHAZjwBhHOt C2kj+6vsxn83KjuQw7DDqUj4VtcOf+lB06z+DQUzHFP2kA8lEbM= =SG7s -----END PGP SIGNATURE----- --o0ZfoUVt4BxPQnbU--