LIN-BAIRSTOW ALGORITHM for HP67/97 UPDATE!
|
08-12-2024, 02:47 PM
(This post was last modified: 08-19-2024 10:48 PM by plore90.)
Post: #1
|
|||
|
|||
LIN-BAIRSTOW ALGORITHM for HP67/97 UPDATE!
Hello everyone,
here I am again to present my latest program on the LIN-BAISTROW algorithm for HP67/97. The program can find the real and/or complex roots of a polynomial from the 3rd degree to the 7th degree with real coefficients. In the manual contained in the zip file, everything is explained with various examples. I hope that the program can be useful to some of you, and in any case of interest to you for educational purposes on Hp-67/97. The program as usual is written in a very basic way and is contained on two magnetic cards. Refining and compacting it, I think that it could be possible to arrive at the solution up to 8th degree polynomials... Anyone can try it or test it on the emulators of HP67 and HP97 of mister LIMPID FOX that are free for their use. As usual I will be grateful to anyone who reports bugs or makes improvements to the program. Thanks for your attention Plore90 **************** UPDATE!!!! In the new attachment there is the version of the program "Lin-Bairstow" published on "HP-67/97 EUROPE User's Group" which allows to find the real and complex roots of a polynomial up to degree 18. **************** |
|||
08-12-2024, 09:23 PM
Post: #2
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Here are a few links for comparison:
Therefore they can not be translated as is to the HP-67/97. But it should be possible to back-port Jean-Marc Baillard's program for the HP-41C to the HP-67/97. |
|||
08-12-2024, 10:29 PM
Post: #3
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Hi Thomas,
Thanks for the insight and suggestions... plore90 |
|||
08-14-2024, 01:46 PM
(This post was last modified: 08-14-2024 05:42 PM by Thomas Klemm.)
Post: #4
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Here's a program that uses 112 lines.
A program B to solve the quadratic equation is also included. Lin-Bairstow This program is based on the Lin-Bairstow method to find the roots of a polynomial of degree \(n\): \(P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_2 x^2 + a_1 x + a_0 = 0\) Code: 001: 31 25 11 : f LBL A Registers \(\begin{matrix} R_0 & 10 + n \\ R_1 & p \\ R_2 & q \\ R_3 & c = c_j \\ R_4 & {c}′ = c_{j+1} \\ R_5 & {c}'' = c_{j+2} \\ R_6 & b = b_i \\ R_7 & {b}′ = b_{i+1} \\ R_8 & \\ R_9 & \\ R_{10} & a_n \\ R_{11} & a_{n-1} \\ R_{12} & a_{n-2} \\ R_{13} & \cdots \\ R_{14} & \cdots \\ \end{matrix}\) Quadratic Solver This program solves the quadratic equation: \(T(x)=x^2+px+q=0\) Code: 097: 31 25 12 : f LBL B Just be aware that this program can't find complex roots. Instead an Error will be displayed. However it's easy to find the complex solutions. Just use: CHS \(\sqrt{x}\) The solutions then are: \(Y \pm iX\) Example \(P(x)=2x^5-9x^4+15x^3+65x^2-267x+234=0\) Insert coefficients Code: CL REG Initialization Store \(10 + n\) in register \(0\) and initialize \(p = q = 1\). Code: 15 STO 0 Run program Code: A 14.0000 Code: B 1.5000 Conclusion \(2x^5-9x^4+15x^3+65x^2-267x+234=\) \((x^2+1.5x-4.5)(2x^3-12x^2+42x-52)\) Solutions For \(x^2+1.5x-4.5=0\): \(x_1=1.5\) \(x_2=-3\) Initialize guess Code: 1 STO 1 Run program again Code: A 12.0000 Code: B Error Code: P<>S Conclusion \(2x^3-12x^2+42x-52=\) \((x^2-4x+13)(2x-4)\) Solutions For \(x^2-4x+13=0\): \(x_3=2+3i\) \(x_4=2-3i\) For \(2x-4=0\): \(x_5=2\) Summary Factors \(2x^5-9x^4+15x^3+65x^2-267x+234=\) \((x^2+1.5x-4.5)(x^2-4x+13)(2x-4)=\) \((x-1.5)(x+3)(x^2-4x+13)2(x-2)=\) \((2x-3)(x+3)(x^2-4x+13)(x-2)\) Solutions \(x_1=1.5\) \(x_2=-3\) \(x_3=2+3i\) \(x_4=2-3i\) \(x_5=2\) |
|||
08-14-2024, 03:28 PM
Post: #5
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Thanks so much Thomas!!!!
|
|||
08-14-2024, 05:29 PM
Post: #6
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Let me add a few notes:
Code: DATA |
|||
08-14-2024, 09:35 PM
Post: #7
|
|||
|
|||
RE: LIN-BAIRSTOW ALGORITHM for HP67/97
Thank's Thomas
Paolo |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)