megengine.functional.asinh¶
- asinh(x)[source]¶
Element-wise \(\sinh^{-1}(x)\) function.
Calculates the inverse hyperbolic sine for each element \(x_i\) of the input tensor \(x\).
This function has domain
[-infinity, +infinity]
and codomain[-infinity, +infinity]
.Special cases
For floating-point operands,
If \(x_i\) is
NaN
, the result isNaN
.If \(x_i\) is
+0
, the result is+0
.If \(x_i\) is
-0
, the result is-0
.If \(x_i\) is
+infinity
, the result is+infinity
.If \(x_i\) is
-infinity
, the result is+infinity
.
- Parameters
x – input tensor whose elements each represent the area of a hyperbolic sector. Should have a floating-point data type.
- Returns
a tensor containing the inverse hyperbolic sine of each element in \(x\). The returned tensor must have a floating-point data type determined by Type promotion rules.
Examples
>>> F.asinh(0) Tensor(0.0, device=xpux:0)
Element-wise inverse hyperbolic sine:
>>> x = Tensor([0, 1, -1]) >>> F.asinh(x) Tensor([ 0. 0.8814 -0.8814], device=xpux:0)