From: Dieter K. <cra...@us...> - 2009-05-28 22:40:04
|
Update of /cvsroot/maxima/maxima/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7844 Modified Files: simp.lisp Log Message: Checking for a mtimes expressions as a base in expressions like (a*b)^q*(a*b)^r, where q+r=1. Related bug report: ID: 826623 "simplifer returns %i*%i" Tested with GCL 2.6.8 and CLISP 2.44. No problems with the testsuite. Index: simp.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/simp.lisp,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- simp.lisp 22 May 2009 10:43:35 -0000 1.78 +++ simp.lisp 28 May 2009 22:39:30 -0000 1.79 @@ -1771,7 +1771,15 @@ ((maxima-constantp (car x)) (go const)) ((onep1 w) - (return (rplaca (cdr fm) (car x)))) + (cond ((mtimesp (car x)) + ;; A base which is a mtimes expression. + ;; Remove the factor from the lists of products. + (rplacd fm (cddr fm)) + ;; Multiply the factors of the base with + ;; the list of all remaining products. + (setq rulesw t) + (return (muln (nconc y (cdar x)) t))) + (t (return (rplaca (cdr fm) (car x)))))) (t (go spcheck)))) ((or (maxima-constantp (car x)) |