in reply to Re: Rounding numbers
in thread Rounding numbers
The result for .678 should be 0,68, not 0.67. The int can certainly be used for building a rounding subroutine, but not with the code presented, it is quite more complicated.$ perl -e 'print int(.678*100)/100;' 0.67
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Rounding numbers
by muneer222 (Initiate) on Mar 27, 2014 at 01:24 UTC |