(calcFunc-collect): Normalize the coefficients of the

polynomial rather than the whole polynomial.
This commit is contained in:
Jay Belanger 2008-11-26 02:39:57 +00:00
parent c8ca9217d5
commit 9f6a59d16c
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-11-26 Vincent Belaïche <vincent.b.1@hotmail.fr>
* calc/calc-alg.el (calcFunc-collect): Normalize the coefficients
of the polynomial rather than the whole polynomial.
2008-11-25 Chong Yidong <cyd@stupidchicken.com>
* mail/mailabbrev.el (define-mail-abbrev): When reading from

View file

@ -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 ...),