Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
XP is just a number
 
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: (15)
As of 2014-04-24 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (566 votes), past polls