How can I properly calculate with floats in Python? Whenever I calculate normally, the numbers are so inaccurate. I expected more from a numeric-oriented language like Python.
Python Version: 3.7
Code:
4.2+8.9
Result:
13.100000000000001
This might not seem like much, but since I am writing an algorithm that adds numbers to floating point numbers hundreds of times, this starts to become an issue.