hello,
i have a program that calculates data using floats and i noticed that if i run it more then once with the same values, i get different answers...
when i ran the program 5 times, i got the following answers:Code:float size = 0.015f, max = 0.3f / size; char sTemp[256]; sprintf(sTemp, "%f\n", max); // display sTemp in a messagebox or something
1) 19.999979
2) 20.000021
3) 19.999941
4) 19.999941
5) 20.000021
these small inaccuracies lead to alot of problems in the program.