![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Someone else might be able to provide more definitive advice about that
As regards the operation $m % $n, the perlop documentation ( see perdoc perlop ) states: <quote> If the operands $m and $n are floating point values and the absolute value of $n (that is "abs($n)") is less than "(UV_MAX + 1)", only the integer portion of $m and $n will be used in the operation (Note: here "UV_MAX" means the maximum of the unsigned integer type). </quote> So perl's calculation of 3335.99999999995 % 3330 ( == 5) is being done as documented. Cheers, Not "someone else" In reply to Re^5: Variables are automatically rounded off in perl
by syphilis
|
|