Message174039
The documentation for Decimal.remainder_near is incorrect. It states:
"If both are equally close, the one chosen will have the same sign as self."
That's incorrect: instead, the chosen remainder has the property that it makes the corresponding quotient even rather than odd. E.g.,
>>> Decimal(25).remainder_near(Decimal(10))
Decimal('5')
>>> Decimal(35).remainder_near(Decimal(10))
Decimal('-5') |
|
Date |
User |
Action |
Args |
2012-10-28 12:20:53 | mark.dickinson | set | recipients:
+ mark.dickinson, docs@python |
2012-10-28 12:20:53 | mark.dickinson | set | messageid: <1351426853.23.0.197083736305.issue16348@psf.upfronthosting.co.za> |
2012-10-28 12:20:53 | mark.dickinson | link | issue16348 messages |
2012-10-28 12:20:53 | mark.dickinson | create | |
|