In python:
>>> x = [0.287, 0.059, 0.118, 0.001, 0.001, 0.024, 0.307, 0.001, 0.201, 0.001]
>>> print sum(x)
1.0
But:
>>> print sum(x) == 1.0
False
Why is floating point error causing this? can someone explain??
In python:
>>> x = [0.287, 0.059, 0.118, 0.001, 0.001, 0.024, 0.307, 0.001, 0.201, 0.001]
>>> print sum(x)
1.0
But:
>>> print sum(x) == 1.0
False
Why is floating point error causing this? can someone explain??