Xref: utzoo comp.lang.pascal:5141 comp.sys.ibm.pc.hardware:4499 comp.os.msdos.programmer:2810 sci.engr:516 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!altos!altos86!rcollins From: rcollins@altos86.Altos.COM (Robert Collins) Newsgroups: comp.lang.pascal,comp.sys.ibm.pc.hardware,comp.os.msdos.programmer,sci.engr Subject: Re: Numerical Methods for Poynomial Root Finding? Message-ID: <4564@altos86.Altos.COM> Date: 14 Jan 91 16:13:18 GMT References: <5231@trantor.harris-atd.com> Reply-To: rcollins@altos86.UUCP (Robert Collins) Followup-To: comp.lang.pascal Distribution: na Organization: Altos Computer Systems, San Jose, CA Lines: 29 In article <5231@trantor.harris-atd.com> blombardi@x102c.ess.harris.com (Bob Lombardi 44139) writes: > >Lacking that (I get three strikes, don't I?) can anyone refer me to >source code in Pascal, BASIC, or FORTRAN that finds the roots of >polynomials? I can usually translate the other two languages into TP >if I get code in them. > I'm not familiar with the algortithm you mentioned, but I programmed a polynomial ROOT algorithm using BAIRSTOW's method in 8087 assembler. It's short, and most definitely fast -- some 28X faster than compiled QUICK-BASIC. BAIRSTOW's method uses partial derivatives to force convergence of polynomial roots. It finds all real and complex roots. Each root of a 7th degree polynomial can usually be solved in less than 10 iterations to an accuracy of 1E-6. I wrote the assember to interface to (most) any high-level language, using any memory model size (through changing compile-time switches). So I would think this algorithm could be interfaced to Turbo-Pascal...though I have never tried it. If memory serves me correctly, the algorithm has tunable parameters. For example, the size of the polynomial can be variable -- at run time, the convergence factor is also tunable, but only at compile-time. If interested, I'd be happy to send anybody a copy of the source code. -- "Worship the Lord your God, and serve him only." Mat. 4:10 Robert Collins UUCP: ...!sun!altos86!rcollins HOME: (408) 225-8002 WORK: (408) 432-6200 x4356