store/[org.clojure/clojure "1.8.0"] clj::clojure.core/rem

Official Documentation

Add notes
Arities
==================================================
   [num div]

Docstring
==================================================
  remainder of dividing numerator by denominator.

Source

(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)))

Example 1

Edit
;; 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

Example 2

Edit
(rem 10 9)
;; => 1

(rem 2 2)
;; => 0

Uses on crossclj