Math.acosh( ) In JavaScript

The Math.acosh() function in Javascript is used to return the hyperbolic arc-cosine of a number.
Math.acosh (x) = arcosh(x) = y ≧ 0 such that cosh (y)=x
acosh() is a static method of Math, therefore it is always used as Math.acosh(), rather than as a method of a Math object created.



Parameters: This function accepts single parameter value which is the number whose hyperbolic arc-cosine you want to know.

Returns: It returns the hyperbolic arc-cosine of the given number and if the parameter passed is less than 1, it returns NaN.


Input  : Math.acosh(1)
Output : 0

Input  : Math.acosh(0)
Output : NaN

Input  : Math.acosh(-1)
Output : NaN

Input  : Math.acosh(2)
Output : 1.3169578969248166