PHP acosh() Function

Quick summary: The PHP acosh() function returns the inverse hyperbolic cosine of a number.

PHP acosh() Syntax

acosh(float $num): float
PHP

PHP acosh() Basic examples

echo acosh(1);
PHP
Output:
0

The inverse hyperbolic cosine of 1 is 0.

echo acosh(2);
PHP
Output:
1.3169578969248

Returns result in radians.

PHP acosh() Real-world usage

$value = 10;
$result = acosh($value);
echo $result;
PHP
Output:
2.9932228461264

Used in scientific and engineering calculations.

PHP acosh() Edge cases

var_dump(acosh(0.5));
PHP
Output:
float(NAN)

Input must be >= 1. Values below 1 return NAN.

PHP acosh() Common mistakes

Passing values less than 1

acosh() is only defined for values >= 1.

Incorrect
echo acosh(0);
Correct
if ($value >= 1) echo acosh($value);

Validate input before calling acosh().

PHP acosh() Frequently Asked Questions

What does acosh() do?

Returns inverse hyperbolic cosine.

Input range?

>= 1.

Use case?

Advanced math calculations.

Returns NAN?

If input < 1.

Return unit?

Radians.

Performance?

Fast.

Common mistake?

Wrong input range.

Return type?

float.

Safe?

Yes.

Alternative?

Math libs.

Used in science?

Yes.

Supports floats?

Yes.

PHP acosh() Related PHP Functions