[WP34s] The ultimate polynomial rootsolver is here ;-)



#7

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


#8

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

(x-1.234)^20 = 0

Namir


#9

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.

#10

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


#11

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


#12

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 ... :-)

Possibly Related Threads…
Thread Author Replies Views Last Post
  Polynomial program Michael Carey 12 3,900 11-20-2013, 08:43 PM
Last Post: CR Haeger
  HP Prime polynomial long division bluesun08 13 3,795 10-30-2013, 03:29 AM
Last Post: parisse
  [HP-Prime xCAS] Review Polynomial Tools + BUGs + Request CompSystems 0 1,007 09-05-2013, 12:53 PM
Last Post: CompSystems
  Matrix Characteristic Polynomial - Reloaded. Ángel Martin 12 3,605 08-22-2013, 05:33 PM
Last Post: Thomas Klemm
  New Blog Post: Length of a Polynomial Segment Eddie W. Shore 1 1,225 01-17-2013, 08:56 PM
Last Post: Namir
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 1,243 10-04-2012, 04:59 PM
Last Post: Paul Dale
  Polynomial roots again ... fhub 13 3,772 12-28-2011, 12:49 PM
Last Post: fhub
  [wp34s] Incomplete Gamma on the wp34s Les Wright 18 5,312 12-06-2011, 11:07 AM
Last Post: Namir
  [wp34s] Romberg Integration on the wp34s Les Wright 2 1,515 12-04-2011, 10:49 PM
Last Post: Les Wright
  WP34S: Valentin Albillo's Polynomial Root Finder Miguel Toro 28 7,331 11-23-2011, 07:39 PM
Last Post: Miguel Toro

Forum Jump: