Java Math cosh() Method

Facebooktwitterredditpinterestlinkedinmailby feather

The cosh() method of Math class returns the first hyperbolic cosine((e+e)/2) of a double value.

Syntax:

public static double cosh(double x)

Parameters:

The parameter ‘x’ represents the number whose hyperbolic cosine is to be determined.

Return Value:

The cosh() method returns the hyperbolic cosine of x.

Special cases of the cosh() method are as follows:

  • It returns NaN, is the argument passed is NaN.
  • It returns positive infinity, if the argument passed is infinite.
  • It returns 1.0, if the argument passed is zero.

Example 1:

 Output:

Example 2:

 Output:

Example 3:

 Output:

Example 4:

 Output:

Facebooktwitterredditpinterestlinkedinmailby feather