# Quadratic Equation program for the 15C (II)

This program is Copyright © 2002 by Raúl Lión Arrese and is used here by permission.

This program is supplied without representation or warranty of any kind. Raúl Lión Arrese 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

The program IS ONLY 25 LINES LONG (26 bytes, I think)

Usage: ax^{2}+bx+c=0; enter a, b, c on the stack. The roots are returned on the stack in levels x and y. 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

## Program

LBL 0
4
×
R↑
×
CHS
X⇔Y
CHS
STO 0
x^{2}
+
√x
STO 1
RCL 0
+
X⇔Y
2
×
÷
RCL 0
RCL - 1
LST X
÷
X⇔Y
RTN

Go back to the software library

Go back to the main exhibit hall