[issue34907] calculation not working properly

2018-10-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: For future reference, please don't post unnecessary screen shots and images. Code is text, please copy and paste it as text, not as pixels. Images make it difficult or impossible for the blind and visually impaired to contribute. -- nosy: +steven.d

[issue34907] calculation not working properly

2018-10-05 Thread Zachary Ware
Change by Zachary Ware : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue34907] calculation not working properly

2018-10-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: 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 p

[issue34907] calculation not working properly

2018-10-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: and you can read this link where we explain the limits of the float type: https://docs.python.org/3/tutorial/floatingpoint.html -- status: closed -> open ___ Python tracker

[issue34907] calculation not working properly

2018-10-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: because you have the round with the float type. you could use the decimal module with Decimal In [1]: import decimal In [2]: decimal.Decimal('15.06') + 5 Out[2]: Decimal('20.06') -- nosy: +matrixise stage: -> resolved status: open -> closed _

[issue34907] calculation not working properly

2018-10-05 Thread Cem
New submission from Cem : as shown below for some reason 15.06 + 5 results in an addition of 0.002 and i want to know why its an bug or something im doing wrong but below it i tried it with 15.07 it works -- components: Windows files: Capture.PNG messages: 327143 nosy: hwk_un1te,