Facebook Page Twitter Page LinkedIn Page
× Java Tutorial Java Advanced Java Resources


The Java Math sinh() method is used to return hyperbolic sine of a value. The hyperbolic sine of x is defined as:

sinh

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 below example, 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