Function: calcFunc-fdiv
calcFunc-fdiv is an autoloaded and byte-compiled function defined in
calc-frac.el.gz.
Signature
(calcFunc-fdiv A B)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-frac.el.gz
(defun calcFunc-fdiv (a b) ; [R I I] [Public]
(cond
((Math-num-integerp a)
(cond
((Math-num-integerp b)
(if (Math-zerop b)
(math-reject-arg a "*Division by zero")
(math-make-frac (math-trunc a) (math-trunc b))))
((eq (car-safe b) 'frac)
(if (Math-zerop (nth 1 b))
(math-reject-arg a "*Division by zero")
(math-make-frac (math-mul (math-trunc a) (nth 2 b)) (nth 1 b))))
(t (math-reject-arg b 'integerp))))
((eq (car-safe a) 'frac)
(cond
((Math-num-integerp b)
(if (Math-zerop b)
(math-reject-arg a "*Division by zero")
(math-make-frac (cadr a) (math-mul (nth 2 a) (math-trunc b)))))
((eq (car-safe b) 'frac)
(if (Math-zerop (nth 1 b))
(math-reject-arg a "*Division by zero")
(math-make-frac (math-mul (nth 1 a) (nth 2 b)) (math-mul (nth 2 a) (nth 1 b)))))
(t (math-reject-arg b 'integerp))))
(t
(math-reject-arg a 'integerp))))