Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: how to always round up in perl?

by Ratazong (Prior)
on Feb 25, 2011 at 09:18 UTC ( #890149=note: print w/ replies, xml ) Need Help??


in reply to Re: how to always round up in perl?
in thread how to always round up in perl?

Which I wouldn't recommend, because it fails in the following situation (with $n2) ...

my $n1 = 3.3; my $n2 = 4; print int($n1 + 1)," ",int($n2 + 1), "\n";


Comment on Re^2: how to always round up in perl?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2015-07-03 13:21 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 (53 votes), past polls