in reply to
Answer: How do I round a number?
in thread math
$rounded = int ( $orig + 0.5 ) assumes $rounded is positive.
More generally: use POSIX; $rounded = floor ( $orig + 0.5 )
or $rounded = sprintf( "%.f" , $orig ) to properly handle the half-way case
See also `perldoc -q round`
I guess so
I guess not
Results (163 votes),