Log2


Function Log2( numeric expression )


Returns the logarithm of base 2


Syntax a = Log2( x )


Remarks

The base 2 logarithm of x is the power to which 2 would have to be raised to yield a result of x.


See Also:

Exp2 Log Log10 Math Functions


Example Script


NUMBER i


FOR i = 2000 TO 2100 STEP 5

PRINT "The log( base 2) of "; i; " is "; LOG2(i)

NEXT i


Script Output


The log( base 2) of 2000 is 10.9657842846621

The log( base 2) of 2005 is 10.9693865213423

The log( base 2) of 2010 is 10.9729797860663

The log( base 2) of 2015 is 10.9765641234153

The log( base 2) of 2020 is 10.9801395776392

The log( base 2) of 2025 is 10.9837061926593

The log( base 2) of 2030 is 10.9872640120725

The log( base 2) of 2035 is 10.9908130791536

The log( base 2) of 2040 is 10.9943534368589

The log( base 2) of 2045 is 10.9978851278291

The log( base 2) of 2050 is 11.0014081943928

The log( base 2) of 2055 is 11.004922678569

The log( base 2) of 2060 is 11.0084286220706

The log( base 2) of 2065 is 11.0119260663068

The log( base 2) of 2070 is 11.0154150523867

The log( base 2) of 2075 is 11.0188956211216

The log( base 2) of 2080 is 11.0223678130285

The log( base 2) of 2085 is 11.025831668332

The log( base 2) of 2090 is 11.0292872269682

The log( base 2) of 2095 is 11.0327345285867

The log( base 2) of 2100 is 11.0361736125535