Function: math-poly-gcd-list
math-poly-gcd-list is a byte-compiled function defined in
calc-poly.el.gz.
Signature
(math-poly-gcd-list LST)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-poly.el.gz
;;; Run GCD on all elements in a list.
(defun math-poly-gcd-list (lst)
(if (or (memq 1 lst) (memq -1 lst))
(math-poly-gcd-frac-list lst)
(let ((gcd (car lst)))
(while (and (setq lst (cdr lst)) (not (eq gcd 1)))
(or (eq (car lst) 0)
(setq gcd (math-poly-gcd gcd (car lst)))))
(if lst (setq lst (math-poly-gcd-frac-list lst)))
gcd)))