PHP acosh() Function
The PHP acosh() function returns inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:
In special cases it returns the following:
- If the argument is NAN or its value is less than 1, then the result is NAN.
Syntax
acosh(number)
Parameters
number |
Required. Specify the value. |
Return Value
Returns the inverse hyperbolic cosine of a value.
Example:
In the example below, acosh() function is used to find out the inverse hyperbolic cosine of a value.
<?php echo "acosh(1) = ".acosh(1)."\n"; echo "acosh(2) = ".acosh(2)."\n"; echo "acosh(100) = ".acosh(100)."\n"; echo "acosh(0) = ".acosh(0)."\n"; echo "acosh(-1) = ".acosh(-1)."\n"; echo "acosh(NAN) = ".acosh(NAN)."\n"; ?>
The output of the above code will be:
acosh(1) = 0 acosh(2) = 1.3169578969248 acosh(100) = 5.2982923656105 acosh(0) = NAN acosh(-1) = NAN acosh(NAN) = NAN
❮ PHP Math Reference