Although there seems to be not much interest in polynomial rootsolving, here's finally my program for the WP34s - maybe at least a few members here will like and use it. ;-)

I've put it in the Article section:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=1133

Now I've also put the file in my download folder:

http://www.hpmuseum.org/guest/fhub/prs.zip

If you have any remarks, suggestions or questions about my program feel free to post them here. Of course also if you find any polynomial(s) where my program fails or gives wrong or inaccurate results - although this is very unlikely. ;-)

Just in case you need a polynomial rootsolver for the PC, or if you want to test my WP34s program - here's a very interesting website about polynomial rootsolving, which has programs for the PC and also an online rootsolver:

http://www.hvks.com/Numerical/winsolve.html

There's also still the previous version of this 'RootFinder' program available (WinSolve), which has the advantage that it doesn't need .NET4, so this is my prefered version:

http://www.hvks.com/Numerical/Downloads/winsolve.zip

Merry Christmas to all,

Franz

*Edited: 3 Jan 2012, 7:33 a.m. after one or more responses were posted*

How does your root solver handle polynomials with a high number of duplicate roots? Such as:

(x-1.234)^20 = 0

Namir

Quote:

How does your root solver handle polynomials with a high number of duplicate roots? Such as:
(x-1.234)^20 = 0

Your example above will be solved

**exactly** - well, at least if you enter all coefficients with full precision, but that's not possible e.g. for 1.234^20. But with integer coefficients it works.

The Laguerre method automatically solves all polynomials of the form (x-x0)^n correctly, and all other multiplicities within a polynomial should be solved by my special routine for multiple roots - usually exact for integer roots (and even not too 'long' rational numbers) and with about 12 or more digits precision for all other (irrational) roots.

You can try the examples that Valentin has posted about a month ago (the thread is in the archive and has also a name like "polynomial roots solver").

He has given the examples (x+1)^30 and (x^2+x+1)^10 and both are solved exactly by my program. Also the example from the HP-71B paper (x+1)^20 gives absolutely correct roots, whereas the HP-71B program returns very inaccurate (I would call it even wrong) solutions.

Franz

*Edited: 25 Dec 2011, 6:13 p.m. *

Quote:

How does your root solver handle polynomials with a high number of duplicate roots? Such as:
(x-1.234)^20 = 0

Hi again, Namir!

I've now written a small routine which created your above polynomial and then let my program solve it, and although of course the coefficients couldn't be stored with full precision (i.e. all digits) my PRS solver returns all 20 solutions absolutely exact as -1.234!

I think that tells all about the quality of this polynomial rootsolver ... :-)

Franz

Hmmm. Shouldn't the root have been positive 1.234? Might have some work yet. :-)

Quote:

Hmmm. Shouldn't the root have been positive 1.234? Might have some work yet. :-)

Oops, of course you're right!

My short program just created (x+1.234)^20 instead of (x-1.234)^20.

So everything is fine at the end ... :-)