I am trying to sum this:
2449210.0000000000 + 0.00010000000000000000
and I get this:
2449210.0000999998
both numbers are defined as double
and I am programming in C using VS10.
I have been reading about precission in this field but I have come to no profitable solution (something with long double
??). I need this sumation to be correct. Any ideas?
EDIT: I dont want to know why this happens (already do), but how to run around this deficiency.
thanks