Javatpoint Logo
Javatpoint Logo

Java Math.expm1() method

The java.lang.Math.expm1() is used to return the Euler's number e raised to the power of a double value and subtract one form it. Here, e is an Euler's number and it is approximately equal to 2.718281828459045.

Syntax

Parameter

x = It is the exponent to raise e to in the computation of ex -1.

Return

It returns the value of ex - 1
  • If the argument is positive or negative double value, this method will return the output.
  • If the argument is Positive Infinity, this method will return Positive Infinity.
  • If the argument is Negative Infinity, this method will return -1.0.
  • If the argument is Zero, this method will return Zero with the same sign as the argument.
  • If the argument is NaN, this method will return NaN.

Example 1

Test it Now

Output:

6.38905609893065

Example 2

Test it Now

Output:

-0.9990881180344455

Example 3

Test it Now

Output:

0.0

Example 4

Test it Now

Output:

Infinity

Example 5

Test it Now

Output:

-1.0

Example 6

Test it Now

Output:

NaN

Next TopicJava Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA