summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-poly.el
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2007-06-25 20:55:56 +0000
committerDavid Kastrup <dak@gnu.org>2007-06-25 20:55:56 +0000
commitfed082a09c8a870c262ffdff360a4a25b81c400d (patch)
treeac160ad1d1fdd87c526aa41871ae159dbcb40520 /lisp/calc/calc-poly.el
parent9a51747bac45695aba40b3595c55237196b0fdcd (diff)
(math-padded-polynomial)
(math-partial-fractions): Add some function comments.
Diffstat (limited to 'lisp/calc/calc-poly.el')
-rw-r--r--lisp/calc/calc-poly.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 0bcf78af86..2300088874 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -982,10 +982,16 @@
(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))))
(defun math-partial-fractions (r den var)
+ "Return R divided by DEN expressed in partial fractions of VAR.
+All whole factors of DEN have already been split off from R.
+If no partial fraction representation can be found, return nil."
(let* ((fden (calcFunc-factors den var))
(tdeg (math-polynomial-p den var))
(fp fden)