Message359999
>>> from decimal import Decimal
>>> round(Decimal('-123.499999999999999999999999999999999999999999'))
-124.0
I would expect -123.0, even considering Py2 rounding convention details (away from zero), Decimal rounding convention (default rounding=ROUND_HALF_EVEN), floating point specifics...
Works as expected in Py3. Both Py2 and Py3 use same default Decimal rounding=ROUND_HALF_EVEN.
Could be I'm missing some detail... |
|
Date |
User |
Action |
Args |
2020-01-14 21:08:15 | ahrvoje | set | recipients:
+ ahrvoje |
2020-01-14 21:08:15 | ahrvoje | set | messageid: <1579036095.34.0.13379826917.issue39335@roundup.psfhosted.org> |
2020-01-14 21:08:15 | ahrvoje | link | issue39335 messages |
2020-01-14 21:08:14 | ahrvoje | create | |
|