The Museum of HP Calculators

Quadratic Equation for the HP-95C

This program is Copyright © 1977 by Hewlett-Packard Company and is used here by permission. It was originally printed in the HP-95C Applications book. This program was entered by André Wilhelmus and the curator added comments from the HP manual.

This program is supplied without representation or warranty of any kind. André Wilhelmus, Hewlett-Packard 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.

Program Listing

CODE KEYS
A-000    lbl A f LBL A
A-001       21 ENTER ↑
A-002       12 R↓
A-003       24 ÷
A-004        2 2
A-005       24 ÷
A-006       22 CHS − (b / 2a)
A-007       21 ENTER ↑
A-008       42 b2 / 4a2
A-009       12 R↓
A-010       12 R↓
A-011       11 x⇔y
A-012       24 ÷ c/a
A-013    35  0 STO 0
A-014       49
A-015    61 64 f PAUSE D
A-016    62 43 g x<0
A-017    63  3 GTO 3 If D < 0, roots are complex.
A-018       41 √x
A-019       11 x⇔y
A-020    62 43 g x<0 If −b/2a < 0, GTO 1
A-021    63  1 GTO 1
A-022       59 + x1 = − (b/2a) + √D
A-023    63  2 GTO 2 - - - - - - - - - - - - - - -
A-024 61 63  1 f LBL 1
A-025       11 x⇔y x1 = − (b/2a) − √D
A-026       49 - - - - - - - - - - - - - - -
A-027 61 63  2 f LBL 2
A-028       14 PRINT x x1
A-029       44 1/x
A-030    45  0 RCL 0
A-031       39 ×
A-032       14 PRINT x x2 = c / (x1a)
A-033    61 14 f SPACE
A-034    61 53 f RTN - - - - - - - - - - - - - - -
A-035 61 63  3 f LBL 3 Complex roots.
A-036       22 CHS
A-037       41 √x v = √-D
A-038       11 x⇔y
A-039       14 PRINT x u
A-040       11 x⇔y
A-041       14 PRINT x v
A-042    61 14 f SPACE

Go back to the HP-95C software library
Go back to the general software library
Go back to the main exhibit hall