Definitely, reading the documentation is advisable. Maybe the name of the
program should be improved, though the classical name for the computation is
"real root isolation".
rootsepsilon influences the bound on permissible error.
realroots does not look for (or find) approximations to complex roots. It
only finds rational bounding intervals around each of the real roots, of
width rootsepsilon, and then returns the center-points of those intervals.
It uses Sturm sequences, or at least originally did so, to find isolating
intervals. The refinement can be done in any number of ways, but I suspect
something not very clever, like bisection, is used.
Realroots will always compute rational numbers. In the commercial macsyma,
if rootsepsilon is a floating-point number, the rational number is converted
to float. similarly for bfloats.
Perhaps the documentation should be made more explicit, leaving no doubt as
to what is being computing, how and why.
Raising another point: when the documentation is changed, do the versions
in Portuguese, Spanish, German... also get fixed?
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Raymond Toy
> Sent: Friday, August 25, 2006 8:23 AM
> To: sen1 at math.msu.edu
> Cc: maxima at math.utexas.edu
> Subject: Re: [Maxima] roots of cubics?
>
> >>>>> "sen1" == sen1 <sen1 at math.msu.edu> writes:
>
> sen1> The polynomial is p(z) = -z^3 + 14*z + 12
>
> sen1> As one might expect, its roots obtained by solve
> are somewhat of a
> sen1> mess.
>
> radcan(rectform(<roots>))
>
> produces something less messy.
>
> sen1> However, realroots produces 3 rational roots.
>
> [snip]
>
> sen1> So, trying to verify that the rational $z_1$ was a
> root is only
> sen1> accurate to about 10^(-8).
>
> sen1> Is this kind of thing to be expected?
>
> sen1> I was surprised that "realroots" produced rational
> solutions in the
> sen1> first place, but, given that, I thought I'd be in
> the realm of
> sen1> rational arithmetic.
>
> Perhaps reading the documentation for realroots will be enlightening.
> It was for me, since I've never used realroots before. It
> doesn't explain why the roots are rational, but it does
> explain why they're not exact.
>
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>