fn

acosh

Tensor
acosh(x: Tensor)
source

Inverse hyperbolic cosine.

Short-name alias of arccosh. Computes the principal branch of arccosh(x)\operatorname{arccosh}(x) for real inputs.

Parameters

xTensor
Input tensor with values in the domain x1x \geq 1.

Returns

Tensor

Element-wise inverse hyperbolic cosine.

Notes

Mathematical definition:

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

Inputs with x<1x < 1 produce NaN. The derivative is 1/x211 / \sqrt{x^{2} - 1}, which is singular at x=1x = 1.

Examples

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