Post Reply 
(35S) - Quadratic root finder -- high performance
05-30-2014, 02:29 AM (This post was last modified: 06-15-2017 01:33 PM by Gene.)
Post: #1
(35S) - Quadratic root finder -- high performance
In the attached PDF file I offer an HP 35s program to find the roots of a quadratic equation. The program requires the calculator to be in RPN mode. Place the coefficients of the quadratic on the stack and execute the program. The answers are displayed in the x and y registers. For example, to use the program to find the roots of 3x^2 + 2x -1 = 0 press [3] [ENTER] [2] [ENTER] [1] [+/-] [XEQ] [Q] [ENTER]. After execution of this example, y = 0.33333... and x = -1.

I realize there are much shorter quadratic root finder programs available for the HP 35s. The goal of this program is to handle all types of cases with accuracy, both real and complex, including cases that challenge the accuracy and range limits of the calculator. It also leaves the "last x" register unaffected and has an undo feature to remove the result from the stack and return the original coefficients to the stack. To undo, press [XEQ] [Q] [0] [0] [3].

The program uses storage registers H, O, and U as temporary storage. It leaves the "user flags" unaffected. (It manipulates flag 10 but will leave the flag as it was when the program started.)

Try some of the examples shown in the attached PDF file on other quadratic root finder programs to see if they perform as accurately as this program does.

This program uses algorithms adapted from this journal article:
R.D. Middlebrook, "Methods of Design-Oriented Analysis: The Quadratic Equation Revisited," in Frontiers in Education, 1992 Proceedings. Twenty-Second Annual Conference, pages 95-101, published by IEEE.

The heart of these methods is also contained in this PDF:
http://www.rdmiddlebrook.com/D_OA_Rules&...0Roots.pdf


Attached File(s)
.pdf  HP35s_Program_Quadratic_Root_Finder_High_Performance.pdf (Size: 111.44 KB / Downloads: 116)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(35S) - Quadratic root finder -- high performance - Douglas De Boer - 05-30-2014 02:29 AM



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