pub enum UnaryOp {
Show 28 variants
Neg,
Abs,
Sign,
Not,
Floor,
Ceil,
Round,
RoundEven,
Exp,
Expm1,
Log,
Log1p,
Sqrt,
Rsqrt,
Cbrt,
Sin,
Cos,
Tan,
Tanh,
Logistic,
Square,
ErfInv,
Lgamma,
Digamma,
Erf,
Erfc,
BesselI0e,
BesselI1e,
}Expand description
An elementwise operation with one operand and a result of the same type.
Variants§
Neg
-x (integers wrap around).
Abs
|x| (integers wrap around).
Sign
-1, 0, or 1 (NaN for NaN, and the sign of zero is kept).
Not
Logical or bitwise not.
Floor
Round toward negative infinity.
Ceil
Round toward positive infinity.
Round
Round to the nearest integer, halfway cases away from zero.
RoundEven
Round to the nearest integer, halfway cases to even.
Exp
e^x.
Expm1
e^x - 1.
Log
Natural logarithm.
Log1p
log(1 + x).
Sqrt
Square root.
Rsqrt
1 / sqrt(x).
Cbrt
Cube root.
Sin
Sine.
Cos
Cosine.
Tan
Tangent.
Tanh
Hyperbolic tangent.
Logistic
1 / (1 + e^-x).
Square
x * x (integers wrap around).
ErfInv
The inverse of the error function.
Lgamma
The logarithm of the absolute value of the gamma function.
Digamma
The digamma function, the derivative of lgamma.
Erf
The error function.
Erfc
The complementary error function, 1 - erf(x).
BesselI0e
The exponentially scaled modified Bessel function of order 0,
exp(-|x|) I0(x).
BesselI1e
The exponentially scaled modified Bessel function of order 1,
exp(-|x|) I1(x).