Method Math.log2() Method log2 float log2(int|float x) Description The 2-logarithm of x. Method log2 float log2(int|float x) Description The 2-logarithm of x.