Flash Lite 2.x and 3.0 ActionScript Language Reference

LOG2E (Math.LOG2E property)

public static LOG2E : Number

A mathematical constant for the base-2 logarithm of the constant e (Math.E), expressed as log2e, with an approximate value of 1.442695040888963387.

The Math.log method computes the natural logarithm of a number. Multiply the result of Math.log() by Math.LOG2E obtain the base-2 logarithm.

Example

This example shows how to obtain the base-2 logarithm of a number:

trace(Math.log(16) * Math.LOG2E);
// Output: 4