Function: math-mod
math-mod is an autoloaded and byte-compiled function defined in
calc-misc.el.gz.
Signature
(math-mod A B)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-misc.el.gz
;; Compute A modulo B, defined in terms of truncation toward minus infinity.
;;;###autoload
(defun math-mod (a b) ; [R R R] [Public]
(cond ((and (Math-zerop a) (not (eq (car-safe a) 'mod))) a)
((Math-zerop b)
(math-reject-arg a "*Division by zero"))
((and (Math-natnump a) (Math-natnump b))
(math-imod a b))
((and (Math-anglep a) (Math-anglep b))
(math-sub a (math-mul (math-floor (math-div a b)) b)))
(t (require 'calc-ext)
(math-mod-fancy a b))))