Now you and me can reuse our rounding code all day, giggling as the split-based solution chokes on a well-placed $num = '123E-1'...sub round_to_nths { my ($num, $n) = @_; (int $num*$n)/$n }
In reply to Re^2: Round down to '.5' or '.0'
by gamache
in thread Round down to '.5' or '.0'
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |