## [Maxima-commits] CVS: maxima/src solve.lisp,1.3,1.4

 [Maxima-commits] CVS: maxima/src solve.lisp,1.3,1.4 From: David Billinghurst - 2004-05-25 02:41:02 ```Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19777/src Modified Files: solve.lisp Log Message: Fix for bug calculating eigenvalues() with multiple roots For example, eigenvalues(matrix([3,1,0,0],[-4,-1,0,0],[7,1,2,1],[-17,-6,-1,0])); Patch by Barton Willis, reviewed by Gosei Furuya. Index: solve.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/solve.lisp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- solve.lisp 3 Jan 2004 14:18:52 -0000 1.3 +++ solve.lisp 25 May 2004 02:40:52 -0000 1.4 @@ -319,12 +319,18 @@ (DO ((TERMS (CDR *EXP) (CDR TERMS))) ((NULL TERMS)) (SOLVE (CAR TERMS) *VAR 1)) - 'MTIMES) - ((EQ (CAAR *EXP) 'MEXPT) - (COND ((AND (INTEGERP (CADDR *EXP)) - (PLUSP (CADDR *EXP))) - (SOLVE (CADR *EXP) *VAR (CADDR *EXP)) - 'MEXPRAT))))) + 'MTIMES))) + +;; This code is commented out because it exposes a bug in the way +;; solve (or its friends) handles multiplicities. A previous +;; version (1.2) had a typo (caar *exp) 'mexp ...) that prevented this +;; bug from manifesting. Barton Willis, 12 May 2004 + +;; ((EQ (CAAR *EXP) 'MEXPT) +;; (COND ((AND (INTEGERP (CADDR *EXP)) +;; (PLUSP (CADDR *EXP))) +;; (SOLVE (CADR *EXP) *VAR (CADDR *EXP)) +;; 'MEXPRAT))))) ;;; Predicate to test for presence of troublesome trig functions to be ;;; canonicalized. A table of when to make substitutions should ```

 [Maxima-commits] CVS: maxima/src solve.lisp,1.3,1.4 From: David Billinghurst - 2004-05-25 02:41:02 ```Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19777/src Modified Files: solve.lisp Log Message: Fix for bug calculating eigenvalues() with multiple roots For example, eigenvalues(matrix([3,1,0,0],[-4,-1,0,0],[7,1,2,1],[-17,-6,-1,0])); Patch by Barton Willis, reviewed by Gosei Furuya. Index: solve.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/solve.lisp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- solve.lisp 3 Jan 2004 14:18:52 -0000 1.3 +++ solve.lisp 25 May 2004 02:40:52 -0000 1.4 @@ -319,12 +319,18 @@ (DO ((TERMS (CDR *EXP) (CDR TERMS))) ((NULL TERMS)) (SOLVE (CAR TERMS) *VAR 1)) - 'MTIMES) - ((EQ (CAAR *EXP) 'MEXPT) - (COND ((AND (INTEGERP (CADDR *EXP)) - (PLUSP (CADDR *EXP))) - (SOLVE (CADR *EXP) *VAR (CADDR *EXP)) - 'MEXPRAT))))) + 'MTIMES))) + +;; This code is commented out because it exposes a bug in the way +;; solve (or its friends) handles multiplicities. A previous +;; version (1.2) had a typo (caar *exp) 'mexp ...) that prevented this +;; bug from manifesting. Barton Willis, 12 May 2004 + +;; ((EQ (CAAR *EXP) 'MEXPT) +;; (COND ((AND (INTEGERP (CADDR *EXP)) +;; (PLUSP (CADDR *EXP))) +;; (SOLVE (CADR *EXP) *VAR (CADDR *EXP)) +;; 'MEXPRAT))))) ;;; Predicate to test for presence of troublesome trig functions to be ;;; canonicalized. A table of when to make substitutions should ```