fn

arccosh

Tensor
arccosh(x: Tensor)
source

Inverse hyperbolic cosine.

Verbose alias of acosh. Computes the principal branch arccosh(x)=log ⁣(x+x21)\operatorname{arccosh}(x) = \log\!\bigl(x + \sqrt{x^{2} - 1}\bigr), defined for real x1x \geq 1.

Parameters

xTensor
Input tensor; element-wise values must satisfy x1x \geq 1 for a real result.

Returns

Tensor

Element-wise inverse hyperbolic cosine, same shape as x.

Notes

Mathematical definition:

arccosh(x)=log ⁣(x+x21),x1.\operatorname{arccosh}(x) = \log\!\bigl(x + \sqrt{x^{2} - 1}\bigr), \qquad x \geq 1.

Inputs with x<1x < 1 produce NaN through the real sqrt branch. The derivative is 1/x211 / \sqrt{x^{2} - 1}, singular at x=1x = 1. Both arccosh and acosh refer to the same composite; either spelling may be used for parity with NumPy or reference-framework code.

Examples

>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 10.0])
>>> lucid.arccosh(x)
Tensor([0.    , 1.3170, 2.9932])