bfloat roots of polynomials



Raymond Toy pisze:
> Adam Majewski wrote:
>> Hi
>>
>> I'm trying to use your program for polynomial given by recurence 
>> relation ( see: http://fraktal.republika.pl/mset_centers.html);
>> My polynomial :
>> P(n):=if n=0 then 0 else P(n-1)^2+c;
>> List of coefficients:
>> give_coefficients(n):=block( P(n):=if n=0 then 0 else P(n-1)^2+c, 
>> Pn:expand(P(n)), degree:hipow(Pn,c), 
>> a:makelist(coeff(Pn,c,degree-i),i,0,degree) );
>> example of use:
>> a:give_coefficients(3);
>> (%o7) [1,2,1,1,0]
>>
>> but :
>> polyroots(a);
>> does not work.
>> What I do wrong?
>>
>>   
> Did you get the second e-mail with the new_poly function in it?  You
> need that.  And since the coefficients are rational, the roots will only
> have double-float precision.  If you want more precision, you need to
> convert them to bfloats and set fpprec appropriately.
> 
> However, even with that, it doesn't work either. :-(  The constant term
> is zero, which confuses the algorithm.   If you remove that, polyroots
> works:
> 
> polyroots([1,2,1,1]);
> [.7448617666197442 %i - .1225611668766536,
>                - .7448617666197443 %i - .1225611668766536, -
> 1.754877666246693]
> 
> polyroots needs to be updated.  I'll do that soon. 
> 
> Ray
Great. Let me know when you do it.
One can compare results with other programs:
Maxima -allroots ( http://fraktal.republika.pl/mset_centers.html ),
Octave (  http://fraktal.republika.pl/doc/octave.txt )
WebSolver ( http://fraktal.republika.pl/doc/websolve_solutions.txt )

regards

Adam Majewski