Element-wise remainder.
Result has sign of the divident, which differs from base R's %%, which is available
via nv_mod() and has sign of divisor.
Arguments
- lhs, rhs
(
arrayish)
Arrayish values of data type integer, unsigned integer, or floating-point. Must have the same shape.
Value
arrayish
Has the same shape and data type as the inputs.
It is ambiguous if both inputs are ambiguous.
StableHLO
Lowers to stablehlo::hlo_remainder().
Examples
prim_remainder(1, -3)
#> AnvlArray
#> 1
#> [ CPUf32?{} ]
1 %% -3
#> [1] -2