Why when I'm doing this simple math subtraction I get this answer ?
In[10]: 1-0.9
Out[10]: 0.09999999999999998
someone know how to fix this ?
Refer https://docs.python.org/2/tutorial/floatingpoint.html
Use round(1-0.9, n)
where it rounds the result to n decimal places
This is a common problem with floating point precision. Usually people round when floats are displayed so the precision limitation is not shown.