Just been asked: int($x) gives strange result
1/10 and 3/10 are periodic numbers in binary, just like 1/3 is a periodic number in decimal. They can't be represented exactly by a floating point number.
In reply to Re: An arithmetic oddity
by ikegami
in thread An arithmetic oddity
by jxb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |