Java.lang Package Classes

Java StrictMath - sinh() Method



The java.lang.StrictMath.sinh() method returns 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 x)

Parameters

x Specify the value whose hyperbolic sine is to be returned.

Return Value

Returns the hyperbolic sine of x.

Exception

NA.

Example:

In the example below, sinh() method is used to find out the hyperbolic sine of a value.

import java.lang.*;

public class MyClass {
 public static void main(String[] args) {
  System.out.println(StrictMath.sinh(0));   
  System.out.println(StrictMath.sinh(2));
  System.out.println(StrictMath.sinh(4));     
 }
}

The output of the above code will be:

0.0
3.626860407847019
27.28991719712775

❮ Java.lang - StrictMath