All methods of java.lang.StrictMath class : Set 1, Set 2
The java.lang.StrictMath.exp() is an inbuilt method in Java is used to return a Euler number raised to the power of the specified double value. It gives rise to three special results:
- The result is positive infinity when the given argument is positive infinity.
- The result is positive zero when the argument is negative infinity.
- The result is NaN when the given argument is NaN.
public static double exp(double num)
Parameters: This method accepts one parameter num which is of double type which is the exponent to raise e to.
Return Value: The method returns the value e^num, where e is the base of the natural logarithms.
Input: num = 7 Output: 1096.6331584284585 Input: num = (1.0 / 0.0) Output: Infinity
Below programs illustrate the java.lang.StrictMath.exp() method:
The exp value of 0.0 = 1.0 The exp value of Infinity = Infinity The exp value of 4.0 = 54.598150033144236
The exp value of -0.0 = 1.0 The exp value of Infinity = Infinity The exp value of 14.0 = 1202604.2841647768
- StrictMath tan() Method in Java
- StrictMath log() Method In Java
- StrictMath sin() Method in Java
- StrictMath pow() Method in Java
- StrictMath nextAfter() Method in Java
- StrictMath max() Method in Java With Examples
- StrictMath multiplyExact() Method in Java
- StrictMath tanh() Method in Java
- StrictMath random() Method in Java
- StrictMath ulp() Method In Java with Examples
- StrictMath nextUp() Method in Java
- StrictMath nextDown() Method in Java
- StrictMath round() method in Java
- StrictMath rint() Method in Java
- StrictMath log1p() Method in Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.