i have a very weird problem with a float.
i've read from a file a number:
423.230000
if i:
it prints me:Code:printf("%f ",tmp[*n].val+x);
423.230000 that is ok!
tmp[*n].val is a float component of a structure containing the integer (423.00000) and x is a float containing 0.230000
but if i do:
it prints me:Code:tmp[*n].val+=x; printf("%f ",tmp[*n].val);
423.230011
Where does the 0.000011 comes from ?
This problem occurs within a function!
How can I fix it ?
Thank you!