Re: BUG #19467: Inconsistency in MOD() result involving POWER() and floating-point precision in PostgreSQL

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: fmusqlgen(at)163(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19467: Inconsistency in MOD() result involving POWER() and floating-point precision in PostgreSQL
Date: 2026-04-27 12:20:21
Message-ID: CANWCAZaQfqAaATv4=tkRvV4mNW+6-XGcVTAfZw7qNcMBAuEN2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 27, 2026 at 6:33 PM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> Mathematically, this corresponds to the fractional part of 3^70.31, which
> should be deterministic for a given evaluation strategy.
>
> However, different systems produce significantly different results:

These two statements don't contradict eachother.

Trying the expression on WolframAlpha shows 0.41 is close to the
expected value, so I don't see a bug here.

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jian he 2026-04-27 12:34:19 Re: BUG #19466: Server crash (SIGSEGV) when FETCH after ALTER TYPE during open cursor
Previous Message Ayush Tiwari 2026-04-27 12:12:57 Re: BUG #19468: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype