The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(71B) Lin-Bairstow Method for HP-71B
02-02-2022, 01:03 PM (This post was last modified: 02-21-2022 01:10 PM by Gene.)
Post: #1
(71B) Lin-Bairstow Method for HP-71B
Lin-Bairstow Method for HP-71B
====================

This program calculates all real and imaginary roots for polynomials with real coefficients. The program uses DATA statements to store the following data in this the following sequence:

1. The order of the polynomial (variable N).
2. The maximum number of iterations (variable M9)
3. The tolerance for the roots (variable T).
4. The polynomial coefficients starting with a0 and up (array A).

The initial guesses for the roots are stored in variables R and S in lines 120 and 130. The current statements store random numbers in these variables. You can edit lines 120 and 130 to assign different values (such as 1) if the random values in R and S cause the solutions to diverge. The program pauses to display the values in variables R and S to give you an idea if the solution is converging or diverging. In the latter case, you can stop the program and assign different values to variables R and S.

Once you have properly assigned the DATA statement just press the RUN button to run the program. It will display intermediate values for variables R and S. If these values diverge then you are fine. Otherwise, stop the program and RUN it again.

The program displays the results as complex conjugates. If a root is real, its imaginary part is zero of a very small number. If the root is purely imaginary, then its real part is zero of a very small number. Press CONT after view each solution to resume program execution. If the polynomial has an odd order, the last root is a real root displayed as “R = “ followed by the root value.

You can download the program as a CSV file by clicking here. Once you open the file you need to widen the columns to get a better view.

You can download the program as a XLSX file by clicking here. The file shows properly formatted columns and color coded statements that highlight labels, GOTO statements, SUB call, etc.

Enjoy!

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(71B) Lin-Bairstow Method for HP-71B - Namir - 02-02-2022 01:03 PM



User(s) browsing this thread: 1 Guest(s)