Arities ================================================== [num div] Docstring ================================================== remainder of dividing numerator by denominator.

Arities ================================================== [num div] Docstring ================================================== remainder of dividing numerator by denominator.

```
(defn rem
"remainder of dividing numerator by denominator."
{:added "1.0"
:static true
:inline (fn [x y] `(. clojure.lang.Numbers (remainder ~x ~y)))}
[num div]
(. clojure.lang.Numbers (remainder num div)))
```

```
;; rem and mod are commonly used to get the remainder.
;; mod means Gaussian mod, so the result is always
;; non-negative. Don't confuse it with ANSI C's %
;; operator, which despite being although pronounced
;; 'mod' actually implements rem, i.e. -10 % 3 = -1.
(mod -10 3)
;; => 2
(rem -10 3)
;; => -1
```

```
(rem 10 9)
;; => 1
(rem 2 2)
;; => 0
```