Function: calc-add-fractions

calc-add-fractions is an autoloaded and byte-compiled function defined in calc-frac.el.gz.

Signature

(calc-add-fractions A B)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-frac.el.gz
(defun calc-add-fractions (a b)
  (if (eq (car-safe a) 'frac)
      (if (eq (car-safe b) 'frac)
	  (math-make-frac (math-add (math-mul (nth 1 a) (nth 2 b))
				    (math-mul (nth 2 a) (nth 1 b)))
			  (math-mul (nth 2 a) (nth 2 b)))
	(math-make-frac (math-add (nth 1 a)
				  (math-mul (nth 2 a) b))
			(nth 2 a)))
    (math-make-frac (math-add (math-mul a (nth 2 b))
			      (nth 1 b))
		    (nth 2 b))))