+ 1

python calculations inaccurate

Hi everyone. I've been using the python IDLE and think i may have just discovered an error of some sort. For some reason 2.2 * 3 results in 6.6000000000000005 rather than 6.6. I also tried doing 2.2 + 2.2 + 2.2 and it still resulted in the answer above. I'm curious to see if anyone knows why this is happening. Many thanks.

19th Mar 2020, 12:46 PM
Programmer3451
Programmer3451 - avatar
3 odpowiedzi
+ 3
There are some threads about the topic. Check this out: https://www.sololearn.com/Discuss/1288636/?ref=app
19th Mar 2020, 12:52 PM
Kevin ★
+ 2
You are welcome 😀
21st Mar 2020, 4:00 PM
Kevin ★
0
thank you
21st Mar 2020, 3:53 PM
Programmer3451
Programmer3451 - avatar