# JavaScript Math acosh() Method

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

• 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:

• Internet Explorer 12.0
• Firefox 25.0
• Opera 8.0
• Safari 25.0 My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.