You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drewmccluskey edited this page Jan 14, 2019
·
7 revisions
log2
This function returns the log base 2 of n
Syntax:
log2(n)
Argument
Description
double n
The input value
Returns:double
Description:
The function asks: "How many times does the number 2 have to be multiplied by itself to equal n?" For example, function log2(4) will return 2, because 2x2 = 4. There are 2 powers of 2 to equal 4.
Example:
doublevalue;value=log2(16);
This code will set value to 4, beacuse 2x2x2x2 = 16. There are 4 powers of 2 to equal 16.