No such thing as a small change | |
PerlMonks |
Re: How to use the int-function?by moritz (Cardinal) |
on Jan 03, 2011 at 15:02 UTC ( [id://880199]=note: print w/replies, xml ) | Need Help?? |
Please read What Every Computer Scientist Should Know About Floating-Point Arithmetic. The problem is not that int is misbehaving, but that the numbers aren't as exact as they appear.
Perl rounds them upon printing, it looks like an even number, but it is not.
In Section
Seekers of Perl Wisdom
|
|