# JavaScript Math acosh() Method

• Last Updated : 07 Jul, 2020

Below is the example of the Math acosh( ) Method.

Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof. But before you tackle the big projects, we suggest you start by learning the basics. Kickstart your web development journey by learning JS concepts with our JavaScript Course. Now at it's lowest price ever!

• Example:
 ``
• Output:
```1.3169578969248166
0
1.7627471740390859
2.993222846126381
```

The Math.acosh() method is used to get hyperbolic arc-cosine of a number. The hyperbolic arc-cosine is known with many names such as hyperbolic inverse cosine and acosh. It is inverse of the hyperbolic cosine method i.e, The inverse hyperbolic cosine of any value say x is the value y for which the hyperbolic cosine of y is x.

if y = acosh(x)
then x = cosh(y)

For all x≥1,
we have acosh(x)=ln(x+√ x2-1 )

Syntax:

`Math.acosh(x)`

Parameters: This method accepts a single parameter as mentioned above and described below:

• x: Here x is a number whose hyperbolic arc-cosine is going to be calculated.

Return value: It returns the hyperbolic arc-cosine of the given number.If the number is less than 1, it return NaN i.e, not a number.

Below examples illustrate the Math acosh( ) method in JavaScript.

• Example 1: Here output 0 is the hyperbolic arc-cosine of a number 1.
```Input: Math.acosh(1)
Output: 0```
• Example 2:
```Input: Math.acosh(2)
Output: 1.3169578969248166```
• Example 3:
```Input: Math.acosh(3)
Output: 1.7627471740390859```

More example codes for the above method are as follows:
Program 1: It is an error case because complex number can not be taken as the parameter of the method only integer value can be taken as the parameter.

 ``

Output:

`Error: Invalid or unexpected token`

program 2: Other than integer nothing is accepted as the parameter of the method that is why here string as the parameter gives NaN i.e, not a number.

 ``

Output:

```NaN
NaN
```

Program 3:v>Whenever we need to get a get hyperbolic arc-cosine of a number that time we can take help of Math.acosh() method in JavaScript.

 ``

Output:

```2.2924316695611777
3.176313180591656
```

Supported Browsers: