The Museum of HP Calculators


Quadratic Equation III for the HP-15C

This program is by Martin Ask and is used here by permission.

This program is supplied without representation or warranty of any kind. Martin Ask 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

This is yet another quadratic equation program that's only 21 bytes long.

It should be noted that I'm NOT the original author of this program. It was posted in the forums quite some time ago and it seems to have failed to make it into the software library, so here it is!

Usage:

Make sure the equation is in the form "ax2 + bx + c = 0"

Enter a, b and c in order so that they are in registers Z, Y and X respectively.

Run the program. The roots will be placed in the X and Y registers.

If you get an "Error 0", turn on complex mode (SF 8) and try again.

Listing

Line    Instr.    Display

000             
001     LBL D     42,21,14
002     ENTER     36
003     R↑        43 33
004     ÷         10
005     R↑        43 33
006     LST X     43 36
007     ÷         10
008     2         2
009     CHS       16
010     ÷         10
011     ENTER     36
012     ENTER     36
013     x2        43 11
014     R↑        43 33
015     -         30
016     √x        11
017     -         30
018     x⇔y       34
019     LST X     43 36
020     +         40
021     RTN       43 32

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