Java Math exp()

That is, Math.exp(4.0) = e4.0.

The syntax of the exp() method is:

Math.exp(double a)

Here, exp() is a static method. Hence, we are accessing the method using the class name, Math.


exp() Parameters

The exp() method takes a single parameter.

  • a - number to raise e to

exp() Return Values

  • returns ea for the argument a

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


Example: Java Math.exp()

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

Math.exp(4.0) = e4.0