pub enum BinaryOp {
Show 21 variants
Add,
Sub,
Mul,
Div,
Rem,
Pow,
Max,
Min,
Atan2,
And,
Or,
Xor,
ShiftLeft,
ShiftRightLogical,
ShiftRightArithmetic,
Igamma,
Igammac,
IgammaGradA,
RandomGammaGrad,
Polygamma,
Zeta,
}Expand description
An elementwise operation with two operands of the same type and a result of that type.
Variants§
Add
x + y (integers wrap around).
Sub
x - y (integers wrap around).
Mul
x * y (integers wrap around).
Div
x / y. Integer division rounds toward zero; division by zero gives
-1 (signed) or the maximum (unsigned), and MIN / -1 gives MIN.
Rem
The remainder of truncated division, with the sign of x.
x % 0 is x for integers.
Pow
x^y (floats).
Max
The maximum, propagating NaN.
Min
The minimum, propagating NaN.
Atan2
atan2(x, y).
And
Logical or bitwise and.
Or
Logical or bitwise or.
Xor
Logical or bitwise exclusive or.
ShiftLeft
x << y; shifts by the bit width or more give 0.
ShiftRightLogical
x >> y filling with zeros; shifts by the bit width or more give 0.
ShiftRightArithmetic
x >> y filling with the sign bit; shifts by the bit width or more
give 0 or -1.
Igamma
The regularized lower incomplete gamma function P(x, y).
Igammac
The regularized upper incomplete gamma function Q(x, y).
IgammaGradA
The derivative of igamma(x, y) with respect to x.
RandomGammaGrad
The derivative of a sample y of Gamma(x, 1) with respect to x.
Polygamma
The polygamma function psi^(x)(y) (x a natural number).
Zeta
The Hurwitz zeta function zeta(x, y).