in reply to
How do I round up a number?
My preferred answer if you insist on rounding up is the second one given by
Anonymous Monk
above. However, it's best to round to the nearest integer, in which case
int($n+0.5)
is your friend.
Tiefling
Comment on
Re: How do I round up a number?
Download
Code
Replies are listed 'Best First'.
Re: Answer: How do I round up a number?
by
I0
(Priest)
on Jun 11, 2001 at 20:02 UTC
That fails for negative numbers.
[reply]
In Section
Seekers of Perl Wisdom