Re: Arbitrary precision modulo operation

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Dann Corbit <DCorbit(at)connx(dot)com>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, Chadwick Boggs <chadwickboggs(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Arbitrary precision modulo operation
Date: 2004-04-27 01:55:56
Message-ID: 20040427015556.GE2206@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 26, 2004 at 12:48:45PM -0700, Dann Corbit wrote:
> Maple output:
> y := 123456789012345678901234567890 mod 123;
> y := 117

PgSQL 7.3.6 gives the right answer (117), 7.4 gets it wrong (-6). Most
likely a bug was introduced when NUMERIC was rewritten. Strange it
hasn't been noticed before.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte" (Andre Breton)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shanmugasundaram Doraisamy 2004-04-27 02:11:19 Problem installing postgresql 7.3.6 on Redhat 7.3
Previous Message Alvaro Herrera 2004-04-27 01:48:44 Re: 7.3.4 on Linux: UPDATE .. foo=foo+1 degrades massivly