From: Barton W. <wil...@us...> - 2013-06-15 11:36:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via 1623b0d29972eb391f4b501ddb98810d4cc6523c (commit) from c56c12059ecda61a7361e8f4b74d4d18e1020f7f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1623b0d29972eb391f4b501ddb98810d4cc6523c Author: Barton Willis <wi...@un...> Date: Sat Jun 15 06:36:03 2013 -0500 o default algexact to true to_poly_solve o update rtest_to_poly_solve.mac diff --git a/share/to_poly_solve/rtest_to_poly_solve.mac b/share/to_poly_solve/rtest_to_poly_solve.mac index ca89a7c..ca4dd84 100644 --- a/share/to_poly_solve/rtest_to_poly_solve.mac +++ b/share/to_poly_solve/rtest_to_poly_solve.mac @@ -103,7 +103,7 @@ subst(a=2, sol); to_poly_solve(max(2 - x^2, x) = max(-x, x^3/9), x); %union([x=-1] , [x=3])$ -block([algexact : false], to_poly_solve(max(2 - x^2, x) = x^3/9, x)); +to_poly_solve(max(2 - x^2, x) = x^3/9, x, 'algexact = false); %union([x=-3] , [x=-1.55489417989418] , [x=3])$ to_poly_solve(max(x,x^2)=1, x); @@ -563,7 +563,7 @@ to_poly_solve(x - 2 * sqrt (x) = 10,x); to_poly_solve(sin(x)+cos(x)=0,x, 'simpfuncs = ['nicedummies,'expand]); %union([x=2*%pi*%z0-%pi/4],[x=2*%pi*%z0+(3*%pi)/4])$ -/* Fri Feb 1 05:31:56 CST 2008 9changed 0.05 to 5/100) */ +/* Fri Feb 1 05:31:56 CST 2008 changed 0.05 to 5/100) */ to_poly_solve(x*exp(-x)-5/100 = 0,x); %union([x = -lambert_w(-1/20)])$ @@ -576,7 +576,7 @@ to_poly_solve([log(y^2+x^2)+2*x^2/(y^2+x^2)=0,2*x*y/(y^2+x^2)],[x,y]); %union([x=0,y=-1],[x=0,y=1],[x=-%e^(-1),y=0],[x=%e^(-1),y=0])$ /* Wed Oct 25 06:00:39 CDT 2006 */ -block([algexact : false], to_poly_solve([10*q/sqrt(q^2 + 3) - 5*q^3/(q^2+3)^(3/2) = 5.07],[q])); +to_poly_solve([10*q/sqrt(q^2 + 3) - 5*q^3/(q^2+3)^(3/2) = 5.07],[q], 'algexact=false); %union([q = 1.423962227031281], [q = 10.01077844311377], [q = -2.201201253088263*%i])$ @@ -586,7 +586,7 @@ to_poly_solve([x2=x*cos(phi)-y*sin(phi), y2=x*sin(phi)+y*cos(phi)], [x,y], 'simp %union([x=sin(phi)*y2+cos(phi)*x2,y=cos(phi)*y2-sin(phi)*x2])$ /* Thu May 25 09:22:09 CDT 2006 */ -block([algexact:true],to_poly_solve(1+x^(5/2),x, 'simpfuncs = ['expand])); +to_poly_solve(1+x^(5/2),x, 'simpfuncs = ['expand],'algexact=true); %union([x = -sqrt(5-sqrt(5))*sqrt(5)*%i/2^(5/2) -sqrt(5-sqrt(5))*%i/2^(5/2)+sqrt(5)/4-1/4], [x = sqrt(5-sqrt(5))*sqrt(5)*%i/2^(5/2) @@ -601,8 +601,8 @@ nicedummies(to_poly_solve([a1+b2=r2,a1*b2=r3,a3*b1+a2*b2=r4,r4+a5+a3*b2=d5,a5*b1 b1 = %c6,b2 = %c7,r2 = %c7+%c4,r3 = %c4*%c7,r4 = d5-%c5*%c7])$ /* Sun Apr 2 08:31:17 CDT 2006 */ -block([algexact : true, eq : x^3-8*x^2-197*x-502], - every(lambda([s], is(abs(subst(s,eq)) < 1.0e-12)), args(to_poly_solve(eq,x, simpfuncs = ['dfloat])))); +block([eq : x^3-8*x^2-197*x-502], + every(lambda([s], is(abs(subst(s,eq)) < 1.0e-12)), args(to_poly_solve(eq,x, simpfuncs = ['dfloat],algexact = true)))); true$ @@ -611,7 +611,7 @@ to_poly_solve([x^2+y^2=2^2,(x-1)^2+(y-1)^2=2^2],[x,y], 'use_grobner = true, 'sim %union([x=1/2-sqrt(7)/2,y=sqrt(7)/2+1/2],[x=sqrt(7)/2+1/2,y=1/2-sqrt(7)/2])$ /* Wed Mar 28 16:33:34 CDT 2007 */ -block([algexact : false], to_poly_solve([(2*x+1)^3=13.5*(x^5+1)],[x],'simpfuncs=['rationalize])); +to_poly_solve([(2*x+1)^3=13.5*(x^5+1)],[x],'simpfuncs=['rationalize], 'algexact=false); %union([x=-2287278158804185/2251799813685248],[x=7473047756518961/9007199254740992],[x=1],[x=-(135947138237407*%i)/140737488355328-3665567315448253/9007199254740992],[x=(135947138237407*%i)/140737488355328-3665567315448253/9007199254740992])$ nicedummies(to_poly_solve(sin(x)=sin(x),x)); @@ -657,7 +657,7 @@ to_poly_solve(x^8=1,x, simpfuncs = ['rectform]); %union([x=-1],[x=1],[x=-%i],[x=%i],[x=-%i/sqrt(2)-1/sqrt(2)],[x=1/sqrt(2)-%i/sqrt(2)], [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 = ['expand])); +to_poly_solve(sqrt(x)+x^(3/2)=1,x, simpfuncs = ['expand]); %union([x = sqrt(31)/(3*2^(2/3)*(sqrt(31)+3^(3/2))^(1/3)) +sqrt(3)/(2^(2/3)*(sqrt(31)+3^(3/2))^(1/3)) +2^(2/3)/(3*(sqrt(31)+3^(3/2))^(2/3))-2/3])$ @@ -783,7 +783,7 @@ to_poly_solve([x=1,x=2],x); %union()$ /* [ 1452341 ] solve(x^(5/2)+1,x) produces incorrect roots */ -block([algexact:true],to_poly_solve(1+x^(5/2),x, 'simpfuncs = ['expand])); +to_poly_solve(1+x^(5/2),x, 'simpfuncs = ['expand]); %union([x = -sqrt(5-sqrt(5))*sqrt(5)*%i/2^(5/2) -sqrt(5-sqrt(5))*%i/2^(5/2)+sqrt(5)/4-1/4], [x = sqrt(5-sqrt(5))*sqrt(5)*%i/2^(5/2) @@ -799,9 +799,9 @@ nicedummies(to_poly_solve(rat(a+c,a,b,c,d),[a,b])); %union([a=-c,b=%c0])$ /* [ 826915 ] Solve wrong with irreducible polydecomp */ -block([algexact : false, sol, eq], +block([sol, eq], eq : (x^5+x-3)^5+x^5+x-6, - sol : to_poly_solve(eq,x, 'simpfuncs = ['dfloat]), + sol : to_poly_solve(eq,x, 'simpfuncs = ['dfloat],'algexact=false), every(lambda([s], is(cabs(subst(s, eq)) < 1.0e-6)), args(sol))); true$ diff --git a/share/to_poly_solve/to_poly_solve.mac b/share/to_poly_solve/to_poly_solve.mac index 4664ac0..65a3578 100644 --- a/share/to_poly_solve/to_poly_solve.mac +++ b/share/to_poly_solve/to_poly_solve.mac @@ -1,6 +1,6 @@ /* Author Barton Willis University of Nebraska at Kearney - Copyright (C) 2008, 2009, 2010 Barton Willis + Copyright (C) 2008, 2009, 2010, 2013 Barton Willis This program is free software: you can redistribute it or modify it under the terms of the GNU General Public License version two. @@ -392,8 +392,8 @@ lambertify(e,vars) := block([ee, eee, expargs : set(), cexpargs, nexpargs, alias(%solve, to_poly_solve); simp_%solve(e,v,[extraargs]) := block([vc, all_vars, sol, solvedomain, parameter_list, + algexact : assoc('algexact,extraargs,true), alias_solver : false, use_grobner, maxdepth, cntx : false, simpfuncs, ratprint : false], - simpfuncs : assoc('simpfuncs, extraargs, []), if not(member('rectform_log_if_constant, simpfuncs)) then simpfuncs : append(simpfuncs,['real_imagpart_to_conjugate,'rectform_log_if_constant]), @@ -464,7 +464,7 @@ simp_%solve(e,v,[extraargs]) := block([vc, all_vars, sol, solvedomain, parameter conjugate_solver(e,v,vc,simpfuncs, maxdepth)) else ( - sol : errcatch(to_poly_solve_h(e,v, simpfuncs, maxdepth, use_grobner)), + sol : errcatch(to_poly_solve_h(e,v, simpfuncs, maxdepth, use_grobner,algexact)), if emptyp(sol) then simpfunmake('%solve, cons(e,(cons(v,extraargs)))) else first(sol))); simplifying('%solve, 'simp_%solve); @@ -478,7 +478,7 @@ simplifying('%solve, 'simp_%solve); Users should call to_poly_solve, not to_poly_solve_h. */ -to_poly_solve_h(e,v, simpfuncs, maxdepth, grob) := block([eqs : set(), nonalg : set(), listconstvars : false, +to_poly_solve_h(e,v, simpfuncs, maxdepth, grob,use_algexact) := block([eqs : set(), nonalg : set(), listconstvars : false, %gvars, evars, sol, vars, freevars, eqs_vars, non_free, true_sol, %ivar, esave, %sol_vars, %cnds, xsol, nsol, inflag : true, cnds : set(), nonfree, eq, lambert_subs, var_exception, simpfuncs_lambda, nsol_vars], @@ -533,7 +533,7 @@ to_poly_solve_h(e,v, simpfuncs, maxdepth, grob) := block([eqs : set(), nonalg : nonfree : setdifference(nonfree, var_exception), nonfree : subset(nonfree, lambda([s], not featurep(s,'integer))), esave : union(set_of_variables(eqs), nonfree), - sol : to_poly_solve(eqs, nonfree, 'simpfuncs = simpfuncs, 'maxdepth = maxdepth-1, 'use_grobner = grob), + sol : to_poly_solve(eqs, nonfree, 'simpfuncs = simpfuncs, 'maxdepth = maxdepth-1, 'use_grobner = grob, 'algexact=use_algexact), if opequal_p(sol, '%solve) then error("Unable to solve"), /* The solve process introduces new variables. Let %sol_vars be the set ----------------------------------------------------------------------- Summary of changes: share/to_poly_solve/rtest_to_poly_solve.mac | 22 +++++++++++----------- share/to_poly_solve/to_poly_solve.mac | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) hooks/post-receive -- Maxima CAS |