[issue12005] modulo result of Decimal differs from float/int
Mark Dickinson
report at bugs.python.org
Thu May 5 13:42:54 CEST 2011
Mark Dickinson <dickinsm at gmail.com> added the comment:
The doc change should also note that // and divmod suffer from a similar mismatch:
>>> Decimal(-2) // Decimal(3)
Decimal('-0')
>>> -2 // 3
-1
>>> -2.0 // 3
-1.0
However, the invariant that x = x // y * y + x % y is retained, as it should be.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12005>
_______________________________________
More information about the Python-bugs-list
mailing list