May 2001
Intermediate to advanced
720 pages
23h 24m
English
Math.log( ) Method — compute the natural logarithm of a number
Flash 5; may be used when exporting Flash 4 movies
Math.log(x)
A positive integer.
The natural logarithm of x.
The log( ) method calculates the natural
logarithm (i.e., the base-e logarithm) of a
number. See the following example to calculate the base-10 logarithm.
trace (Math.log(Math.E)); // Displays: 1
// Compute the base-10 logarithm of a number
function log10 (x) {
return (Math.log(x) / Math.log(10));
}Read now
Unlock full access