Using int will truncate so if the result, due to the inexact way a computer will represent 0.0001, is, say, 6504.9999997 it will end up as 6504. This seems to work.
johngg@abouriou:~/perl/Monks$ perl -E 'say 0.6505 / 0.0001;' 6505
Cheers,
JohnGG
In reply to Re: finding the correct integer
by johngg
in thread finding the correct integer
by YarNik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |