exp (JavaScript)
Gets an exponential power of e.
Defined in
Math (JavaScript)Syntax
exp(value:double)
: double| Parameter | Description |
|---|---|
value |
A number. See below for special cases. |
| Return value | Description |
|---|---|
double |
E raised to the power of the parameter. |
Usage
Special cases are as follows:- An exponent of
NaNyields NaN. - The exponent of
+Infinityyields positive infinity. - The exponent of
-Infinityyields positive zero.
See log (JavaScript) for the inverse to this method.
Examples
This buttononclick event
calculates the cube root of a number.sessionScope.result =
Math.exp(Math.log(sessionScope.n) / 3)