- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 19
 
log2
        Vašek edited this page Jan 13, 2019 
        ·
        7 revisions
      
    This function returns the log base 2 of n
log2(n)| Argument | Description | 
|---|---|
double n | 
The input value | 
Returns: double
The function asks: "How many times number 2 must be powered by to equal n?" For example, function log2(4) will return 2, because 2x2 = 4.
double value;
value = log2(16);This code will set value to 4, beacuse 2x2x2x2 = 16.
double value;
value = log2(5);This code will set value to 2,321929.
Back to number_functions