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 xtreak
Recipients hwk_un1te, matrixise, paul.moore, steve.dower, tim.golden, xtreak, zach.ware
Date 2018-10-05.16:21:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538756494.83.0.545547206417.issue34907@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the report but I think is a known limitation with floating points and this page explains it well : https://docs.python.org/3.7/tutorial/floatingpoint.html . Using round will be helpful in your situation to round the output to 2 decimal places. I think the issue is also not predictable and a below example on Python 3 is similar to your case. I think this is not a bug in Python but a known behavior that is also present in a lot of other languages.

>>> 0.1+0.2
0.30000000000000004
>>> 0.2+0.2
0.4
>>> 0.2+0.3
0.5
>>> 0.2+0.4
0.6000000000000001
>>>
History
Date User Action Args
2018-10-05 16:21:34xtreaksetrecipients: + xtreak, paul.moore, tim.golden, zach.ware, steve.dower, matrixise, hwk_un1te
2018-10-05 16:21:34xtreaksetmessageid: <1538756494.83.0.545547206417.issue34907@psf.upfronthosting.co.za>
2018-10-05 16:21:34xtreaklinkissue34907 messages
2018-10-05 16:21:34xtreakcreate