i64.rem_s

Pops two

`i64`

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

```
i64.rem_s
```

i64 | The first value to be divided. |

i64 | The second value to divide by. |

i64 | The remaining amount left after dividing the first value by the second one. |

;; Push the i64 values onto the stack i64.const 10 i64.const 3 ;; Get remainder from 10 by 3 seeing it as signed i64.rem_s ;; The stack contains an i64 value of 1 (result = 10 % 3)

;; Push the i64 values onto the stack i64.const 0xF23AB02CF178CD56 i64.const 42 ;; Get remainder from 0xF23AB02CF178CD56 by 42 seeing it as signed i64.rem_s ;; The stack contains an i64 value of -8 ;; result = -992287060805497514 % 42

;; Push the i64 values onto the stack i64.const 0xF23AB02CF178CD56 i64.const 42 ;; Get remainder from 0xF23AB02CF178CD56 by 42 seeing it as unsigned i64.rem_u ;; The stack contains an i64 value of 8 ;; result = 17454457012904054102 % 42