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 ahrvoje
Recipients ahrvoje
Date 2020-01-14.21:08:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579036095.34.0.13379826917.issue39335@roundup.psfhosted.org>
In-reply-to
Content
>>> 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...
History
Date User Action Args
2020-01-14 21:08:15ahrvojesetrecipients: + ahrvoje
2020-01-14 21:08:15ahrvojesetmessageid: <1579036095.34.0.13379826917.issue39335@roundup.psfhosted.org>
2020-01-14 21:08:15ahrvojelinkissue39335 messages
2020-01-14 21:08:14ahrvojecreate