function | since v0.0-927 | clojure.core/rem | Edit |
(rem n d)
Returns the remainder of dividing numerator n
by denominator d
.
Returns NaN
when d
is 0 (divide by 0 error).
remainder of dividing numerator by denominator.
(defn rem
[n d]
(let [q (quot n d)]
(- n (* d q))))