TLDR: It's not just perl. It's (virtually) every computer language out there."
Exactly. JavaScript works the same way. I usually avoid working with floats whenever possible. If I have to get a precise result, then I multiply my number by 1000 to push the decimal point to the right. Whatever comes after the decimal point gets rounded, and it's usually garbage.
In reply to Re^2: Variables are automatically rounded off in perl
by harangzsolt33
in thread Variables are automatically rounded off in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |