math.acosh(x) returns the non-negative inverse hyperbolic cosine of x as a float, undoing math.cosh() for x >= 0.
Because cosh(y) is always at least 1.0, math.acosh(x) requires x >= 1; passing any smaller value raises ValueError.
math.acosh() is a function in Python's standard math module: import it with import math and call math.acosh(...), or import the name directly with from math import acosh.
Syntax
Import math and pass a real number x >= 1.
python
import math
y = math.acosh(x)
Call
What it does
math.acosh(1)
Returns 0.0.
math.acosh(2)
Returns approximately 1.316957....
math.acosh(float("inf"))
Returns inf.
math.acosh(0.5)
Raises ValueError: input must be >= 1.
For inputs near 1 (like 1 + 1e-12), math.acosh() avoids precision loss that naive log(x + sqrt(x*x - 1)) formulas suffer.
Function signatures
python
math.acosh(x, /)
# returns: float inverse hyperbolic cosine >= 0 for x >= 1
Parameters
Parameter
Description
x
Required positional number (int or float) greater than or equal to 1.
Return Value
Return Value
Description
float
Non-negative inverse hyperbolic cosine; returns inf for inf and nan for nan.
Python Examples
Example 1 — Measure Hyperbolic Distance From Unit Ratios
Evaluate math.acosh() across increasing factors starting at 1.0.
python
import math
for ratio in [1.0, 2.0, 5.0, 10.0]:
rapidity = math.acosh(ratio)
print(f"ratio={ratio:>4.1f} -> acosh={rapidity:.4f}")