aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <[email protected]>2008-11-26 02:39:57 +0000
committerJay Belanger <[email protected]>2008-11-26 02:39:57 +0000
commit9f6a59d16c1f296c5f68d97ea61ec60f74dff17b (patch)
tree3b80a07a81d89510e564f66ba78b0d55fa772b19 /lisp/calc
parentc8ca9217d51003b709ff77b92160b5eee60bf8e2 (diff)
(calcFunc-collect): Normalize the coefficients of the
polynomial rather than the whole polynomial.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-alg.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 34d2829f2c..9bcaeab39b 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1598,8 +1598,7 @@
(defun calcFunc-collect (expr base)
(let ((p (math-is-polynomial expr base 50 t)))
(if (cdr p)
- (math-normalize ; fix selection bug
- (math-build-polynomial-expr p base))
+ (math-build-polynomial-expr (mapcar 'math-normalize p) base)
(car p))))
;;; If expr is of the form "a + bx + cx^2 + ...", return the list (a b c ...),