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.

Availability: ActionScript 1.0; Flash Player 5 - In Flash Player 4, the methods and properties of the Math class are emulated using approximations and might not be as accurate as the non-emulated math functions that Flash Player 5 supports.

Example

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

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

Flash CS3