Re: BUG #3387: mod on non-integer returns bad result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Filip Krska" <filip(dot)krska(at)comstar(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: BUG #3387: mod on non-integer returns bad result
Date: 2007-06-15 14:15:50
Message-ID: 3249.1181916950@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Filip Krska" <filip(dot)krska(at)comstar(dot)cz> writes:
> select mod (70.0,70) from dual;
> returns
> 70.0
> instead of
> 0.0

PG 8.0 gets this right. I think this demonstrates that Bruce's 8.1 patch
http://archives.postgresql.org/pgsql-committers/2005-06/msg00045.php
didn't actually fix anything, merely move the failure cases around.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-06-15 15:42:04 Re: BUG #3387: mod on non-integer returns bad result
Previous Message Filip Krska 2007-06-15 12:53:14 BUG #3387: mod on non-integer returns bad result