Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends
Date: 2023-12-11 10:22:23
Message-ID: ZXbi3xo7QhQIe1YN@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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;
>
> gives the incorrect result:
> -$92,233,720,368,547,758.08

Yep, good catch. Reproduced here.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-12-11 12:06:28 BUG #18241: PushTransaction may cause Standby to execute ItemIdMarkDead
Previous Message PG Bug reporting form 2023-12-11 06:00:02 BUG #18240: Undefined behaviour in cash_mul_flt8() and friends