The java.lang.Math.exp() returns euler’s number e raised to the power of a double value.
- 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.
public static double exp(double a) Parameter : a : the exponent part which raises to e.
the value ea, where e is the base of the natural logarithms.
Example : To show working of java.lang.Math.exp() function
20.085536923187668 NaN Infinity 0.0
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.