i32.rem_s
Pops two
i32
values off the stack, divides the first by the second, takes the remaining amount, and then
pushes that on to the stack. This looks at the values as signed integers (can be negative).
$result = $first % $second
Stack In
i32 |
The first value to be divided. |
i32 |
The second value to divide by. |
Stack Out
i32 |
The remaining amount left after dividing the first value by the second one. |
Examples
i32.const 10
i32.const 3
i32.rem_s
i32.const 0xF178CD56
i32.const 42
i32.rem_s
i32.const 0xF178CD56
i32.const 42
i32.rem_u