Modulo two expressions
Description
Method equivalent of modulus operator expr %% other
.
Usage
<Expr>$mod(other)
Arguments
other
|
Numeric literal or expression value. |
Value
Expr
See Also
- Arithmetic operators
-
\
$floor_div()
Examples
#> shape: (11, 2)
#> ┌─────┬──────┐
#> │ x ┆ x%%2 │
#> │ --- ┆ --- │
#> │ i32 ┆ f64 │
#> ╞═════╪══════╡
#> │ -5 ┆ 1.0 │
#> │ -4 ┆ 0.0 │
#> │ -3 ┆ 1.0 │
#> │ -2 ┆ 0.0 │
#> │ -1 ┆ 1.0 │
#> │ … ┆ … │
#> │ 1 ┆ 1.0 │
#> │ 2 ┆ 0.0 │
#> │ 3 ┆ 1.0 │
#> │ 4 ┆ 0.0 │
#> │ 5 ┆ 1.0 │
#> └─────┴──────┘