PHP acosh() Function

Definition and Usage

The acosh() function returns the inverse hyperbolic cosine ratio of given angle in of given parameter. In other words, the return value of asinh() is hyperbolic sine of given parameter. A hyperbolic inverse hyperbolic cosine function is defined as −.

acosh(x) = log(x+sqrt(pow(x,2)-1))

This function returns a float value.

Syntax

acosh ( float $arg ) : float

Parameters

Sr.No Parameter & Description
1 arg
A floating point value whose inverse hyperbolic cosine is to be calculated

Return Values

PHP acosh() function returns inverse hyperbolic cosine ratio of given parameter.

PHP Version

This function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.

Example

Following example calculates acosh(pi/2) and returns 1.0232274785476 which is also the result of formula definition −

<?php
   $arg=M_PI_2;
   $val=acosh($arg);
   $ret=log($arg+sqrt(pow($arg,2)-1));
   echo "acosh(" . $arg . ") = " . $val . "
";    echo "using formula = " . $ret; ?>

Output

This will produce the following result −

acosh(1.5707963267949) = 1.0232274785476
using formula = 1.0232274785476

Example

<?php
   $arg=M_PI;
   $val=acosh($arg);
   echo "acosh(" . $arg . ") = " . $val;
?>

Output

This will produce the following result −

acosh(3.1415926535898) = 1.8115262724609
Updated on: 2026-03-11T23:22:53+05:30

306 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements