Function: calcFunc-polint
calcFunc-polint is an autoloaded and byte-compiled function defined in
calcalg3.el.gz.
Signature
(calcFunc-polint DATA X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calcalg3.el.gz
;;; The following algorithms come from Numerical Recipes, chapter 3.
(defun calcFunc-polint (data x)
(or (math-matrixp data) (math-reject-arg data 'matrixp))
(or (= (length data) 3)
(math-reject-arg data "*Wrong number of data rows"))
(or (> (length (nth 1 data)) 2)
(math-reject-arg data "*Too few data points"))
(if (and (math-vectorp x) (or (math-constp x) math-expand-formulas))
(cons 'vec (mapcar (lambda (x) (calcFunc-polint data x))
(cdr x)))
(or (math-objectp x) math-expand-formulas (math-reject-arg x 'objectp))
(math-with-extra-prec 2
(cons 'vec (math-poly-interp (cdr (nth 1 data)) (cdr (nth 2 data)) x
nil)))))