Java Math - sinh() Method
The Java sinh() method returns hyperbolic sine of a value. The hyperbolic sine of x is defined as:
where e is an Euler's number.
In special cases it returns the following:
- If the argument is NaN, then the result is NaN.
- If the argument is infinite, then the result is an infinity with the same sign as the argument.
- If the argument is zero, then the result is a zero with the same sign as the argument.
Syntax
public static double sinh(double arg)
Parameters
arg |
Specify the value. |
Return Value
Returns the hyperbolic sine of a value.
Exception
NA.
Example:
In the example below, sinh() method is used to find out the hyperbolic sine of a value.
public class MyClass { public static void main(String[] args) { System.out.println(Math.sinh(0)); System.out.println(Math.sinh(2)); System.out.println(Math.sinh(4)); } }
The output of the above code will be:
0.0 3.626860407847019 27.28991719712775
❮ Java Math Methods