[Maxima] Allroot function problem
oscarfh at gmail.com
Thu May 7 19:32:12 CDT 2009
thank you all for the answers.
@Leo: in your example I have the same problem: if I calculate the
roots and then I map using it, it doesn't return 0.
Is there an solution to this problem? I would really appreciate any
help. I am developing a benchmark to analise floating point
computation and I am looking for polynomials to test.
2009/5/7 Raymond Toy <raymond.toy at stericsson.com>:
> reyssat wrote:
>> Raymond Toy a écrit :
>>> If all the coefficients are real, allroots takes advantage of that and
>>> uses a real-valued algorithm so that conjugate pairs of roots are truly
>>> conjugates. If any coefficient is complex, then a complex-valued
>>> algorithm is used. Hence the roots can be different. (I think
>>> sometimes they can be VERY different.)
>> Yes they can be very different just because the roots may depend
>> critically on the coefficients, so any small rounding error on the
>> coefficients implies a big error on the roots. Try for instance
>> P:product(x-i,i,1,23); allroots(P); allroots(%i*P);
>> and look at the roots around 15 to 18 : they are far from integers,
>> even from real numbers (and allroots(P) finds conjugate pairs !).
>> Replacing 23 by 24 is even worse, and 25 (and higher) is beyond the
>> possibilities of allroots.
>> Is there a way to increase the precision of these computations using
>> bfloats with allroots ?
> Use bfallroots.
More information about the Maxima