0

Why does Python calculate the addition of 88.6 and 0.8 and get the result 89.39999999999999 ? And how to fix it?

$ python
Python 3.8.13 (default, Jul 20 2022, 13:16:07) 
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 88.6+0.8
89.39999999999999
Zeitounator
  • 38,476
  • 7
  • 53
  • 66
Tube TT
  • 21
  • 6

0 Answers0