+ 1
Is this a Python bug?
When I try to multiply 60 by 0.06 I get 3.599999999... Same goes for 120 * 0.06, 180 * 0.06 and so on.
3 Respuestas
+ 6
Tihomir Manushev , if the floating point data format does not fit to your precission requirements, you can use the decimal data format. Find more information in the python docs: https://docs.python.org/3.7/library/decimal.html
+ 3
Thank you for your answer. So this means that all programming languages have this issue and I need to format my output by rounding it up
+ 1
Lothar thank you