JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Math.exp() Function

Name

Math.exp() Function---compute ex

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

Math.exp(x)

Arguments

x

A numeric value or expression to be used as the exponent.

Returns

ex, e raised to the power of the specified exponent, x.

Description

Math.exp() computes ex, where e is the base of the natural logarithms, approximately 2.71828.

Usage

You can compute xy using Math.exp() with the following formula:

xy  =  ey*ln(x)

This formula can be expressed in JavaScript as follows:

Math.exp(y * Math.log(x))

See Also

"Math", "Math.log()", "Math.LN10"


Previous Home Next
Math.E Book Index Math.floor()

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell