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
NaN
yields NaN. - The exponent of
+Infinity
yields positive infinity. - The exponent of
-Infinity
yields 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)