Obligatory link to What Every Programmer Should Know About Floating-Point Arithmetic and reference to bignum iff you don't mind the performance hit.
$ perl -wMstrict -Mbignum -le 'print int(0.6505 / 0.0001)' 6505 # Or, limit the scope of the pragma: $ perl -wMstrict -le 'print do { use bignum; int(0.6505 / 0.0001) }' 6505
In reply to Re: finding the correct integer
by haukex
in thread finding the correct integer
by YarNik
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |