Function: calcFunc-idiv

calcFunc-idiv is an autoloaded and byte-compiled function defined in calc-arith.el.gz.

Signature

(calcFunc-idiv A B)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-arith.el.gz
;;;; Number theory.

(defun calcFunc-idiv (a b)   ; [I I I] [Public]
  (cond ((and (Math-natnump a) (Math-natnump b) (not (eq b 0)))
	 (math-quotient a b))
	((Math-realp a)
	 (if (Math-realp b)
	     (let ((calc-prefer-frac t))
	       (math-floor (math-div a b)))
	   (math-reject-arg b 'realp)))
	((eq (car-safe a) 'hms)
	 (if (eq (car-safe b) 'hms)
	     (let ((calc-prefer-frac t))
	       (math-floor (math-div a b)))
	   (math-reject-arg b 'hmsp)))
	((and (or (eq (car-safe a) 'intv) (Math-realp a))
	      (or (eq (car-safe b) 'intv) (Math-realp b)))
	 (math-floor (math-div a b)))
	((or (math-infinitep a)
	     (math-infinitep b))
	 (math-div a b))
	(t (math-reject-arg a 'anglep))))