Java Math expm1()

That is, Math.expm1(4.0) = e4.0-1. Also in mathematics, Math.expm1(x) = ex-1.

The syntax of the expm1() method is:

Math.expm1(double a)

Note: The expm1() method is a static method. Hence, we can call the method directly using the class name Math.


expm1() Parameters

  • a - number to be raised as power of e

expm1() Return Values

  • returns ea-1 for the argument a

Note: Here, e is the Euler's number whose value is 2.71828


Example: Java Math.expm1()

In the above example, we have used the Math.pow() method to compute the e4.0 value. Here, we can see that

Math.expm1(4.0) = e4.0-1