changeset 62470:7e497f7bc556

(math-factor-poly-coefs): Make sure the terms in linear factors in proper order.
author Jay Belanger <jay.p.belanger@gmail.com>
date Wed, 18 May 2005 12:34:30 +0000
parents e454fb80ab88
children 0bdc2e9a381e
files lisp/calc/calc-poly.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-poly.el	Wed May 18 11:25:58 2005 +0000
+++ b/lisp/calc/calc-poly.el	Wed May 18 12:34:30 2005 +0000
@@ -692,12 +692,13 @@
 
 	  ;; Check if linear in math-fet-x.
 	  ((not (cdr (cdr p)))
-	   (math-add (math-factor-protect
-		      (math-sort-terms
-		       (math-factor-expr (car p))))
-		     (math-mul math-fet-x (math-factor-protect
-				  (math-sort-terms
-				   (math-factor-expr (nth 1 p)))))))
+           (math-sort-terms
+            (math-add (math-factor-protect
+                       (math-sort-terms
+                        (math-factor-expr (car p))))
+                      (math-mul math-fet-x (math-factor-protect
+                                            (math-sort-terms
+                                             (math-factor-expr (nth 1 p))))))))
 
 	  ;; If symbolic coefficients, use FactorRules.
 	  ((let ((pp p))