Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCdQl-00GhyY-3v for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Dec 2023 10:22:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rCdQj-00DFIe-Pr for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Dec 2023 10:22:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCdQj-00DFIW-H8 for pgsql-bugs@lists.postgresql.org; Mon, 11 Dec 2023 10:22:29 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCdQh-009rPO-60 for pgsql-bugs@lists.postgresql.org; Mon, 11 Dec 2023 10:22:28 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9538B5C01A4; Mon, 11 Dec 2023 05:22:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 11 Dec 2023 05:22:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1702290146; x=1702376546; bh=AE V1gAcezOEMx/zigSdA6f/HEL4Xuw/oYcM8w5suKSw=; b=SJN73jS8iMF29K6xsU f2popJ+XjfTkPdX7Nt+tOsmKKxluin4iw/drLEGfh0mtO0fRTYu7HJH3khf1iCSB 8fGry8JzXNHeyGoOV1ia94bqiaJ3KXdoj0B1SRxsYSa0qlq5HHT3jCtZkAqa5jGO YThwfUKYhTks6TUp9B/k6d8zzKpRxupXrNHwPr5m+IRD0vazWChcc3dlwWPm0FXj mkbSNFhH5hl+o95vY61OjzwW2J4L5JHJo8+p2E3iQtOIihIe/I6qhjpUFEbJTiZZ QAy3icpe/KXxDqPT9UnzCeqzMqpxIOeDwLcA/lCeKbz6r5UAUy5ttUKHFSuFATdL z4cQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1702290146; x=1702376546; bh=AEV1gAcezOEMx /zigSdA6f/HEL4Xuw/oYcM8w5suKSw=; b=Ts8griTN5avhDeqtX8/HXsSYq90pY lJHpdqqDODfExeVlwt9HOmV19NPO7FXzBnPKUGAdpdIyR3qNvfd2gNFARcmAX/eK 4JQaBZXD2FBYQak6ZEzLGqlX3Pdpqdppo+JKSrnRiW75xbWgo5s38pHt0xVwUwI9 +a/s0nmsYhaQsTffu1hMMD1Ei9+1XZMNn+Y1xWpR+JfAiierZS2WWO5XmvsVFeyt Iak/iHBx5MRUYm/P00xElzKCaYC2Kn7vK9IvDr8aeHnux6zJNVUF0QrmlpAZtOaY Rp9kZCr2g6tH+DqYQbLT2iIorB3RJTn0iISn4UpWknc4dUvkBhL65A1VQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelvddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedvgeduuefhtdeuleettdevjeehheeiveeuieegleetgeeljeelieeuieehgeevhfen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthh grvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Dec 2023 05:22:25 -0500 (EST) Date: Mon, 11 Dec 2023 11:22:23 +0100 From: Michael Paquier To: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends Message-ID: References: <18240-c5da758d7dc1ecf0@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CcRoK7gw4hrcTaId" Content-Disposition: inline In-Reply-To: <18240-c5da758d7dc1ecf0@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --CcRoK7gw4hrcTaId Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 11, 2023 at 06:00:02AM +0000, PG Bug reporting form wrote: > The following multiplication: > SELECT 1_000_000_000::money * 1_000_000_000::float8; >=20 > gives the incorrect result: > -$92,233,720,368,547,758.08 Yep, good catch. Reproduced here. -- Michael --CcRoK7gw4hrcTaId Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmV24t8ACgkQnvQgOdby QH3UJA//U/wiQkO7LHQ1iG0VcJJTh7QKP9W6XvvGDt/q7/RFoN17XVc1993Ki4jG KOlmVBZVNveRS38iwHvYRHH06otjZfBFCbU57MuFrqbewQYQXsF+yNrg/NbUU5I3 xbmrhWkyBr2vGTW8Vx20G8XeA6e43v9VCeuhlBZ0nu7kYpgyXUp+P7Pdwfyvfb5u qh+con4siPwqLXnkIWJRBZHWH7v1c7gYLaCdWSbxpIKS5PISk1ozazVQ+4+PZRP1 DeOxzDstkxpjdI0L17tUTwq3RuSciQ4LuRACSFCj5bKvjyIuz9xoSgEDrBnE+Doj VCeR3TJNKI1OQvWKmD3j+CPb9A67w5XWh+IYD3nhhmr+wdn4ZzEOLJOsSzhOVxIG l7Sw8iA7r+6PzbLYIaM3fTngrav8tnCsAJ8G0lfuz4aLk5G2c2qSm9XPiYtj397a +p6bjueSv6JD/jOm2Wtdzl4aCwlojjALjF2ILe9PLE1pSip4a+6wMXZQqo5KmN0d 7ukjHXhdY80RdfSCMxx9zIMN+q1yZdwTi8DQMGC8kU9g3+IHHw30h8x7qzXvP12f hi9pTctiPJ/rU8LJeCGqonbYaTYGwG+iwgSUIoDpuSTUDnMRv7kBlRnqfMAjL4ds HQkNCUab0C1yydU0f6k7uX3Tf4SMYp1rVeCPSH8pDyHzkw1++L0= =mohR -----END PGP SIGNATURE----- --CcRoK7gw4hrcTaId--