I am using float values in my program, but for some reason the addition of two float values sometimes gives a very strange result
For example:
print(float(3.1) + float(18.8))
output: 21.900000000000002
Why does this happen, and how can I fix it?