Numeric modulo operator is incorrect.

From: Ken-ichi Yamasaki <yama(at)yuzu(dot)gr(dot)jp>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Numeric modulo operator is incorrect.
Date: 2001-04-07 09:33:36
Message-ID: uu241qcjz.wl@SOHO1.kyama$palette.pbs.plala.or.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear sir,

I build PostgreSQL 7.0.3 with jumbo-20010318.patch.gz on Vine Linux2.1.5.

Following result are incorrect. Am I under an illusion?

test=# select '34666624082'::numeric % '34666671'::numeric;
?column?
----------
-46918
(1 row)

test=# select '34666624082'::numeric - '34666671'::numeric
* trunc('34666624082'::numeric / '34666671'::numeric);
?column?
----------
34619753
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jay Guerette 2001-04-07 13:59:48 Re: PostgreSQL 7.0.2 Date Miscalculation
Previous Message Ken-ichi Yamasaki / 山崎賢一 2001-04-07 08:59:12 Numeric modulo operator is incorrect.