Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re (tilly) 1: Power of two round up.

by japhy (Canon)
on Dec 15, 2000 at 23:31 UTC ( #46896=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub next_pwr {
      my ($x,$p) = (@_,2);  # default to next_pwr(X,2)
    ...
      $log = int($log+1) if $log != int($log);
      return $p**$log;
    }
    
  2. or download this
    {
      my %LOG = (2 => log(2));  # most common
    ...
        return $p ** $log;
      }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (22)
As of 2015-07-28 19:42 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 (258 votes), past polls