# megengine.functional.acosh¶

acosh(x)[源代码]

Element-wise $$\cosh^{-1}(x)$$ function.

Calculates the inverse hyperbolic cosine for each element $$x_i$$ of the input tensor $$x$$.

This function has domain [1, +infinity] and codomain [0, +infinity].

Special cases

For floating-point operands,

• If $$x_i$$ is NaN, the result is NaN.

• If $$x_i$$ is less than 1, the result is NaN.

• If $$x_i$$ is 1, the result is +0.

• If $$x_i$$ is +infinity, the result is +infinity.

x – input tensor whose elements each represent the area of a hyperbolic sector. Should have a floating-point data type.

a tensor containing the inverse hyperbolic cosine of each element in $$x$$. The returned tensor must have a floating-point data type determined by 类型提升规则.

>>> F.acosh(1)
Tensor(0.0, device=xpux:0)


Element-wise inverse hyperbolic cosine:

>>> x = Tensor([1, 2, 3])
>>> F.acosh(x)
Tensor([0.     1.317  1.7627], device=xpux:0)