Function: math-mod-intv
math-mod-intv is an autoloaded and byte-compiled function defined in
calc-forms.el.gz.
Signature
(math-mod-intv A B)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-forms.el.gz
(defun math-mod-intv (a b)
(let* ((q1 (math-floor (math-div (nth 2 a) b)))
(q2 (math-floor (math-div (nth 3 a) b)))
(m1 (math-sub (nth 2 a) (math-mul q1 b)))
(m2 (math-sub (nth 3 a) (math-mul q2 b))))
(cond ((equal q1 q2)
(math-sort-intv (nth 1 a) m1 m2))
((and (math-equal-int (math-sub q2 q1) 1)
(math-zerop m2)
(memq (nth 1 a) '(0 2)))
(math-make-intv (nth 1 a) m1 b))
(t
(math-make-intv 2 0 b)))))