allroots patch



On Tue, Jan 12, 2010 at 4:24 PM, Raymond Toy <toy.raymond at gmail.com> wrote:
> Raymond Toy wrote:
>> Andrej Vodopivec wrote:
>>
>>> The polynomial which can't be solved is
>>> x^6-24576*x^5+402653184*x^4-4947802415966*x^3+40532397764222976*x^2+9157742690304*x+2069067169.
>>>
>>> I tried bfallroots with fpprec=32 and is still didn't find any roots.
>>> With fpprec 64 it only finds 2 roots. With fpprec 128 it finds all
>>> roots.
>>>
>>>
>> Interesting. ?I wonder what makes the polynomial so difficult to solve.
>> The roots are pretty well separated, except for a pair near the origin.
>>
> I vaguely remember reading somewhere that sometimes it's better to use
> the complex Jenkins-Traub algorithm, even if the polynomial has real
> coefficients. ?And indeed, this is the case for this polynomial. ?If we
> multiply the polynomial by %i, then allroots, and bfallroots (with
> fpprec = 16) instantly finds all 6 roots. ?The complex conjugates are
> exactly conjugates, but pretty close.

The issue is how to force the complex algorithm from algsys (for the
initial system allroots gets called with the above polynomial).
Multiplying with %i does not work in this case. Maybe maxima should
try with the complex algorithm if the special algorithm for real
polynomials fails.

Andrej