aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2008-11-26 02:39:57 +0000
committerJay Belanger2008-11-26 02:39:57 +0000
commit9f6a59d16c1f296c5f68d97ea61ec60f74dff17b (patch)
tree3b80a07a81d89510e564f66ba78b0d55fa772b19
parentc8ca9217d51003b709ff77b92160b5eee60bf8e2 (diff)
downloademacs-9f6a59d16c1f296c5f68d97ea61ec60f74dff17b.tar.gz
emacs-9f6a59d16c1f296c5f68d97ea61ec60f74dff17b.zip
(calcFunc-collect): Normalize the coefficients of the
polynomial rather than the whole polynomial.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-alg.el3
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c393420cb22..bef08cdb6b1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-11-26 Vincent Belaïche <vincent.b.1@hotmail.fr>
2
3 * calc/calc-alg.el (calcFunc-collect): Normalize the coefficients
4 of the polynomial rather than the whole polynomial.
5
12008-11-25 Chong Yidong <cyd@stupidchicken.com> 62008-11-25 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * mail/mailabbrev.el (define-mail-abbrev): When reading from 8 * mail/mailabbrev.el (define-mail-abbrev): When reading from
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 34d2829f2c3..9bcaeab39b4 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1598,8 +1598,7 @@
1598(defun calcFunc-collect (expr base) 1598(defun calcFunc-collect (expr base)
1599 (let ((p (math-is-polynomial expr base 50 t))) 1599 (let ((p (math-is-polynomial expr base 50 t)))
1600 (if (cdr p) 1600 (if (cdr p)
1601 (math-normalize ; fix selection bug 1601 (math-build-polynomial-expr (mapcar 'math-normalize p) base)
1602 (math-build-polynomial-expr p base))
1603 (car p)))) 1602 (car p))))
1604 1603
1605;;; If expr is of the form "a + bx + cx^2 + ...", return the list (a b c ...), 1604;;; If expr is of the form "a + bx + cx^2 + ...", return the list (a b c ...),