;; rem and mod are commonly used to get the remainder.
;; but when dealing with negative num(ber), the difference
;; between rem and mod becomes obvious
;; mod means Gaussian's mod. So remainder always
;; should be positive value.
;; Remainder is same with % operator in ANSI C
user=> (mod -10 3)
2
user=> (rem -10 3)
-1
;; rem and mod are commonly used to get the remainder.
;; but when dealing with negative num(ber), the difference
;; between rem and mod becomes obvious
;; mod means Gaussian's mod. So remainder always
;; should be positive value.
;; Remainder is same with % operator in ANSI C
user=> (mod -10 3)
2
user=> (rem -10 3)
-1