From 9f6a59d16c1f296c5f68d97ea61ec60f74dff17b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 26 Nov 2008 02:39:57 +0000 Subject: [PATCH] (calcFunc-collect): Normalize the coefficients of the polynomial rather than the whole polynomial. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-alg.el | 3 +-- 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 @@ +2008-11-26 Vincent Belaïche + + * calc/calc-alg.el (calcFunc-collect): Normalize the coefficients + of the polynomial rather than the whole polynomial. + 2008-11-25 Chong Yidong * 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 @@ (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 ...), -- 2.11.4.GIT