Log10E (Math.log10E Property); Log2E (Math.log2E Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example displays the logarithm for three numerical values.
trace(Math.log(0)); // output: -Infinity
trace(Math.log(1)); // output: 0
trace(Math.log(2)); // output: 0.693147180559945
trace(Math.log(Math.E)); // output: 1

LOG10E (Math.LOG10E property)

public static LOG10E :
A mathematical constant for the base-10 logarithm of the constant e (
log10e, with an approximate value of 0.4342944819032518.
The
method computes the natural logarithm of a number. Multiply the result of
Math.log()
by
Math.log()
Math.LOG10E
Availability: ActionScript 1.0; Flash Lite 2.0 - 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-10 logarithm of a number:
trace(Math.log(1000) * Math.LOG10E);
// Output: 3

LOG2E (Math.LOG2E property)

public static LOG2E :
A mathematical constant for the base-2 logarithm of the constant e (
log2e, with an approximate value of 1.442695040888963387.
The
method computes the natural logarithm of a number. Multiply the result of
Math.log
by
Math.log()
Math.LOG2E
Availability: ActionScript 1.0; Flash Lite 2.0 - 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
Number
obtain the base-10 logarithm.
Number
obtain the base-2 logarithm.
), expressed as
Math.E
), expressed as
Math.E
Math
421

Advertisement

Table of Contents
loading

Table of Contents