From: Barton W. <wil...@us...> - 2010-08-29 18:48:30
|
Update of /cvsroot/maxima/maxima/share/contrib In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv25446 Modified Files: to_poly_solve_extra.lisp Log Message: o fix for subst_parallel Index: to_poly_solve_extra.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/to_poly_solve_extra.lisp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- to_poly_solve_extra.lisp 25 Oct 2009 11:57:54 -0000 1.8 +++ to_poly_solve_extra.lisp 29 Aug 2010 18:48:21 -0000 1.9 @@ -216,13 +216,17 @@ ;; Similar to sublis, but allow for substitutions of nonatoms. (defun $subst_parallel (l e) - (let ((alist nil) (is-a-rat ($ratp e))) + (let ((alist nil) (is-a-rat ($ratp e)) (old) (new)) (setq l (if ($listp l) (margs l) (list l))) ;; Build an association list for the Common Lisp sublis function. (dolist (lk l) (if (mequalp lk) - (push (cons (cadr lk) (caddr lk)) alist) + (progn + (setq old (cadr lk)) + (setq new (caddr lk)) + (setq old (if (stringp old) (amperchk old) old)) + (push (cons old new) alist)) (merror "Each substitution must be an equation; found" lk))) (setq e (resimplify (sublis alist ($ratdisrep e) :test #'alike))) ;;or like? (if is-a-rat ($rat e) e))) |