acosh() returns the inverse hyperbolic cosine of a value. Real-valued input should be 1 or greater.
echo acosh(1); // 0
Start with this current pattern. The examples below are retained for additional variations, output and reference.
<?Php
echo acosh(6); // Output 2.4778887302885
echo "<br>";
echo acosh(2.5); // Output 1.5667992369724
echo "<br>";
echo acosh(0); // Output NAN
echo "<br>";
echo acosh(2); // Output 1.3169578969248
echo "<br>";
echo acosh(-2.5); // Output NAN
echo "<br>";
echo acosh(-4); // Output NAN
?>
Syntax
acosh(float X);
X is the input
acosh returns an EDOM error if called with an argument less than 1.0
The acosh() function can be used to find the inverse hyperbolic cosine for values greater than or equal to 1:
$value = 10;
$result = acosh($value);
echo "The acosh of $value is: " . $result;
// Outputs: The acosh of 10 is: 2.99322284612638
You can use acosh() in more complex mathematical expressions:
$value = 20;
$result = pow(acosh($value), 2) + sqrt($value);
echo $result;
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.