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 chrestomanci (Priest)
on Feb 25, 2011 at 09:19 UTC ( [id://890150]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $n = 3.0;
    my $ceiling = int($n);
    $ceiling += 1 if $ceiling != $n;
    
  2. or download this
    my $ceiling = int($n) + ($n != int($n));
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-19 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found