I am using Python for reading a file and converting numerical value written as string to float. I observe a weird conversion:
a="-5.970471694E+02"
b = float(a)
b
>> -597.0471694
bb = np.float64(a)
bb
>> -597.04716940000003
e="-5.970471695E+02"
ee = np.float64(e)
ee
>> -597.0471695
ee-bb
>> -9.9999965641472954e-08
What is the reason of the term "0000003" at the end of bb
. Why I don't observe the same thing for ee
. Is this really a problem? I think this issue is due to the floating-point accuracy but the result seems to be perturbed before I start to use the variables...