JavaScript Tutorial JavaScript References

JavaScript - Math.acosh() Method



The JavaScript Math.acosh() method returns inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:

acosh

Syntax

Math.acosh(x)

Parameters

x Specify the value equal to or greater than 1.

Return Value

Returns the inverse hyperbolic cosine of a value.
If the x is less than 1, it returns NaN.

Example:

In the example below, Math.acosh() method is used to find out the inverse hyperbolic cosine of a value.

var txt;

txt = "Math.acosh(0) = " + Math.acosh(0) + "<br>";
txt = txt + "Math.acosh(2) = " + Math.acosh(2) + "<br>";
txt = txt + "Math.acosh(4) = " + Math.acosh(4) + "<br>";

The output (value of txt) after running above script will be:

Math.acosh(0) = NaN
Math.acosh(2) = 1.3169578969248166
Math.acosh(4) = 2.0634370688955608

❮ JavaScript - Math Object