Function: math-quarter-integer
math-quarter-integer is an autoloaded and byte-compiled function
defined in calc-arith.el.gz.
Signature
(math-quarter-integer X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-arith.el.gz
(defun math-quarter-integer (x)
(if (Math-integerp x)
0
(if (math-negp x)
(progn
(setq x (math-quarter-integer (math-neg x)))
(and x (- 4 x)))
(if (eq (car x) 'frac)
(if (eq (nth 2 x) 2)
2
(and (eq (nth 2 x) 4)
(progn
(setq x (nth 1 x))
(% (if (consp x) (nth 1 x) x) 4))))
(if (eq (car x) 'float)
(if (>= (nth 2 x) 0)
0
(if (= (nth 2 x) -1)
(progn
(setq x (nth 1 x))
(and (= (% (if (consp x) (nth 1 x) x) 10) 5) 2))
(if (= (nth 2 x) -2)
(progn
(setq x (nth 1 x)
x (% (if (consp x) (nth 1 x) x) 100))
(if (= x 25) 1
(if (= x 75) 3)))))))))))