>perl -le"printf qq{%.16e\n}, 5.1" 5.0999999999999996e+000 >perl -le"printf qq{%.16e\n}, 100005.2" 1.0000520000000000e+005
Notice how the computer is unable to represent 5.1 exactly? Others have explained why.
In reply to Re: Explain floating point arithmetic result
by ikegami
in thread Explain floating point arithmetic result
by sanku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |