Java Math expm1() Method
Example
Return ex - 1 for different values of x:
System.out.println(Math.expm1(0));
System.out.println(Math.expm1(1));
System.out.println(Math.expm1(10));
System.out.println(Math.expm1(4.8));
System.out.println(Math.expm1(Math.E));
Definition and Usage
The expm1()
method returns the solution to ex - 1 for any number x.
e is the base of the natural system of logarithms (approximately 2.718282). In Java, the value of e is available as the constant Math.E.
Syntax
public static double expm1(double number)
Parameter Values
Parameter | Description |
---|---|
number | Required. The value of x in the formula ex - 1. |
Technical Details
Returns: | A double value representing the solution to ex - 1 for a number x. |
---|---|
Java version: | 1.5+ |
❮ Math Methods