Home >>Java Math Methods >Java Math.expm1() method
The Math.expm1() Method in Java Math is used to return the number e generated by the Euler to the power of a double value, and to subtract it from one form. Here, e is the number of an Euler and is roughly equal to 2.718281828459045.
public static double expm1(double x)
x = This parameter is used to the exponent to raise e to in the computation of ex -1.
It is used to returns the value of ex - 1
public class MyClass
{
public static void main(String[] args)
{
double x = 3.0;
System.out.println(Math.expm1(x));
}
}
public class Main
{
public static void main(String[] args)
{
double a = -4.0;
System.out.println(Math.expm1(a));
}
}