Both 3408/10000 and 9936/10000 are periodic numbers in binary, just like 1/3 is a periodic number in decimal. It would take infinite storage to store them as floats, so they're not being stored exactly.
You can avoid the problem by using sprintf("%.0f", $x) (rounds) instead of int($x) (truncates).
In reply to Re^3: Why the Integer part of this calculation is 102?
by ikegami
in thread Why the Integer part of this calculation is 102?
by alokam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |