From: Barton W. <wil...@us...> - 2009-09-18 10:58:26
|
Update of /cvsroot/maxima/maxima/share/contrib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10049 Modified Files: rtest_to_poly_solver.mac to_poly_solver.mac Log Message: o Update one test test_to_poly_solver o expunge_nonrelevant_cnds incorrectly expunged constant conditions--fixed o nonrelavant --> nonrelevant Index: rtest_to_poly_solver.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/rtest_to_poly_solver.mac,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rtest_to_poly_solver.mac 27 Jun 2009 04:26:12 -0000 1.4 +++ rtest_to_poly_solver.mac 18 Sep 2009 10:58:10 -0000 1.5 @@ -625,7 +625,7 @@ [x=%i/sqrt(2)-1/sqrt(2)],[x=%i/sqrt(2)+1/sqrt(2)])$ block([algexact:true],to_poly_solve(sqrt(x)+x^(3/2)=1,x,simpfuncs=['rationalize,'dfloat])); -%union([x = 8386985705578541/18014398509481984])$ +%union([x = 4193492852789269/9007199254740992])$ to_poly_solve(a*x=b, x,'simpfuncs = ['rectform]); %union([x=b/a])$ Index: to_poly_solver.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/to_poly_solver.mac,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- to_poly_solver.mac 5 Jul 2009 11:14:15 -0000 1.4 +++ to_poly_solver.mac 18 Sep 2009 10:58:12 -0000 1.5 @@ -433,16 +433,17 @@ [second(nsol)], third(nsol)), nsol_vars : set_of_variables(nsol), %cnds : safer_subst(sk,cnds), - %cnds : expunge_nonrelavant_cnds(%cnds, nsol), + %cnds : expunge_nonrelevant_cnds(%cnds, nsol), nsol : %if(%cnds, nsol, %union()), true_sol : adjoin(nsol, true_sol))), xreduce('%union, true_sol, %union())); /* Maybe all this should be fixed higher up; for now ...*/ -expunge_nonrelavant_cnds (cnds, sol) := block([listconstvars : false, sol_vars : listofvars(sol)], - if is(cnds = true) or is (cnds = false) then cnds +expunge_nonrelevant_cnds (cnds, sol) := block([listconstvars : false, sol_vars : listofvars(sol)], + if cnds = true or cnds = false then cnds else if opequal_p(cnds, "%and", "%or") then ( - map(lambda([x], if lfreeof(sol_vars,x) then true else x), cnds)) - else if lfreeof(sol_vars, cnds) then true else cnds); + map('expunge_nonrelevant_cnds, cnds)) + else if lfreeof(sol_vars, cnds) and not constantp(cnds) then true + else cnds); |