Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 meditating upon the Monastery: (14)
As of 2014-11-26 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (171 votes), past polls