i have a problem when calculating floating point in python, here is an example:
import numpy
print numpy.floor(3*1.4+2*1.4)
>> 6.0
it return 6.0 while i am excepting 7.0
i can fix this simply by
print(numpy.floor( (3*100*1.4*100 + 2*100*1.4*100) / 10000 ))
>> 7.0
but seems its not a very good practices, i have google for a while and try a different type of numpy.float, Decimal, int etc. The problem is still persist. Does anyone have any idea better than this?