[Maxima] Bfloat allroots
raymond.toy at ericsson.com
Fri Dec 12 13:01:32 CST 2008
Some time ago, I wrote jtroot3.mac (share/numeric) to compute roots of
polynomials using Jenkins-Traub algorithm. It mostly works, but some
simple polynomials fail (see https://sourceforge.net/tracker2/?func=detail&aid=2230778&group_id=4933&atid=104933).
What I should have done is taken the existing allroots implementation
and converted it to use bfloats. Well, here it is:
There are probably bugs, but the few tests I tried seem to work, and
the above bug is gone.
While doing this, I also found the undocumented polyfactor variable.
When polyfactor is false, bfallroots and allroots return a list of the
roots. When polyfactor is true, bfallroots and allroots return the
result as a factored polynomial of the form c*(x-r1)*(x-r2)...
Perhaps this can be placed in cpoly.lisp or maybe as a contrib in
Also, I should probably also convert rpoly-sl to support bfloats, and
then allroots and bfallroots will be functionally identical.
Hope this is useful to someone,
More information about the Maxima