Math.exp()
Signature
double exp (double a)
Description
Returns Euler's number e raised to the power of a
double
value. Special cases:
If the argument is NaN, the result is NaN.
If the argument is positive infinity, then the result is
positive infinity.
If the argument is negative infinity, then the result is
positive zero.
A result must be within 1 ulp of the correctly rounded result. Results
must be semi-monotonic.
Parameters
Name | Type | Description |
a | double | The exponent to raise e to. |
Returns
Type | Description |
double | The value ea ,
where e is the base of the natural logarithms. |
Example
String result = String.valueOfDouble (Math.exp (0.5));
Result is: result contains: "1.6487212707001282"