On Sat, Jun 15, 2013 at 8:48 AM, Barton Willis <willisb at unk.edu> wrote:
> I changed the source of to_poly_solve.mac so that it internally defaults
> algexact to true. A user can override the default by appending
> 'algexact=false to the %solve (or to_poly_solve) argument list. Notice
> that algexact : false does *not* guarantee a float result
> (see the user documentation for algexact).
>
>
>
Most importantly, does that set algexact for the whole Maxima session, or
does it then revert to false? I wouldn't want to mess with Maxima that way
just for this - we could set the algexact back and forth in our own use of
to_poly_solve, now that we know this won't have adverse side effects.
> Example
>
> Use default algexact
>
> (%i2) %solve(max(1-x^2,2)=x^3,x);
>
> (%o2) %union([x = 2^(1/3)],[x = (2^(1/3)*sqrt(3)*%i-2^(1/3))/2],
> [x = -(2^(1/3)*sqrt(3)*%i+2^(1/3))/2])
>
> (%i3) float(%);
>
> (%o3) %union([x = 1.259921049894873],
> [x = 0.5*(2.182247271943443*%i-1.259921049894873)],
> [x = -0.5*(2.182247271943443*%i+1.259921049894873)])
>
> Grumble why the need for expand...
>
> (%i4) expand(%);
>
> (%o4) %union([x = 1.259921049894873],
> [x = -1.091123635971721*%i-0.629960524947437],
> [x = 1.091123635971721*%i-0.629960524947437])
>
> Override algexact default:
>
> (%i5) %solve(max(1-x^2,2)=x^3,x,'algexact=false);
>
> (%o5) %union([x = 1.259921095381759],
> [x = -1.091123635971721*%i-0.629960524947437],
> [x = 1.091123635971721*%i-0.629960524947437])
>
> Let me guess that the Sage developers will at least need to change some
> test results. So it goes.
>
I'm not worried about that! Just wanting to find the most exact answers we
can with Maxima :-)