Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Different way of rounding

by tstock (Curate)
on Dec 07, 2002 at 02:35 UTC ( #218205=note: print w/ replies, xml ) Need Help??


in reply to Different way of rounding

I would multiple by 100, then use the POSIX::ceil function.

use POSIX qw(ceil); my $rounded = ceil($i*100) / 100;
Tiago


Comment on Re: Different way of rounding
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://218205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (17)
As of 2015-07-28 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls