Function: math-padded-polynomial

math-padded-polynomial is an autoloaded and byte-compiled function defined in calc-poly.el.gz.

Signature

(math-padded-polynomial EXPR VAR DEG)

Documentation

Return a polynomial as list of coefficients.

If EXPR is of the form "a + bx + cx^2 + ..." in the variable VAR, return the list (a b c ...) with at least DEG elements, else return NIL.

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-poly.el.gz
(defun math-padded-polynomial (expr var deg)
  "Return a polynomial as list of coefficients.
If EXPR is of the form \"a + bx + cx^2 + ...\" in the variable VAR, return
the list (a b c ...) with at least DEG elements, else return NIL."
  (let ((p (math-is-polynomial expr var deg)))
    (append p (make-list (- deg (length p)) 0))))