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

Re: Power of two round up.

by runrig (Abbot)
on Dec 15, 2000 at 23:41 UTC ( #46898=note: print w/replies, xml ) Need Help??


in reply to Power of two round up.

my $num = 17; my $nlog = 2**(int(log($num)/log(2))+1); print $nlog;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://46898]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-06-24 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?