This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author atuining
Recipients
Date 2004-09-20.19:52:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The Decimal class behaves differently from the builtin
integer and float classes when performing modulus and
integer division operations:

>>> decimal.Decimal("14") % decimal.Decimal("10)
Decimal("4")
>>> decimal.Decimal("-14") % decimal.Decimal("10")
Decimal("-4)
>>> 14 % 10
4
>>> -14 % 10
6

Similar behavior occurs with negative numbers with the
integer division operator //.

Should these behave the same way?
History
Date User Action Args
2007-08-23 14:26:22adminlinkissue1031480 messages
2007-08-23 14:26:22admincreate