The Museum of HP Calculators


Quadratic Equation solver (IV) for the HP-15C/11C

This program is by Uri Liebeskind and is used here by permission.

This program is supplied without representation or warranty of any kind. Uri Liebeskind and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

Usage: ax2+bx+c=0; enter a, b, c on the stack.
The roots are returned on the stack in levels x and y.

HP15c Only: If program stops with error 0, then set flag 8 for complex and try again: first complex solution will be in register x ; the second one is its conjugate.

The program is based on the formula:
       -b/2a +/- √((b/2a)2 - c/a)

Program Length: 21 lines.
Register usage: STO .9 and STO .8

Listing

LBL 0
STO .9
R↓
X⇔Y
STO .8
2
CHS
×
÷
ENTER
x2
RCL .9
RCL .8
÷
-
√x
-
X⇔Y
LSTX
+
RTN

Go back to the software library
Go back to the main exhibit hall