Ahh, that makes sense. Still, I think it's a bit odd, considering that the numbers are fairly small.
/ Marcus Agehall (Trådlös)
Previous text:
2003-02-25 09:44: Subject: Do we have a floatingpoint bug?
It's called floats. Floats are not exact. Try the following C-program:
#include <stdio.h> int main() { printf("%f %f\n", (float)35.8, 35.8); return 0; }
If you want exact calculations you don't want floats. Of course, if you compile with with doubles rather than floats, you get better approximations (but still not exact).
/ David Hedbor