Message327148
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
>>> |
|
Date |
User |
Action |
Args |
2018-10-05 16:21:34 | xtreak | set | recipients:
+ xtreak, paul.moore, tim.golden, zach.ware, steve.dower, matrixise, hwk_un1te |
2018-10-05 16:21:34 | xtreak | set | messageid: <1538756494.83.0.545547206417.issue34907@psf.upfronthosting.co.za> |
2018-10-05 16:21:34 | xtreak | link | issue34907 messages |
2018-10-05 16:21:34 | xtreak | create | |
|