This program is Copyright © 1975 by HewlettPackard and is used here by permission. This program was originally published in "HP25 Applications Programs".
This program is supplied without representation or warranty of any kind. HewlettPackard Company 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.
The roots x_{1}, x_{2} of ax^{2} + bx +c = 0
are given by x_{1,2} = (b ± sqrt(b^{2}  4ac))/2a
If D = (b^{2}  4ac)/4a^{2}
is positive or zero, the roots are real. In these cases, better accuracy may sometimes be obtained by first computing the root with the larger absolute value:
If b/2a >= 0, x_{1} = b/2a + sqrt(D)
If b/2a < 0, x_{1} = b/2a  sqrt(D)
In either case, x_{2} = c/( x_{1} a).
If D<0, the roots are complex, being
u ± iv = b/2a ± (sqrt(4acb^{2})/2a)*i
Step 
Instructions 
Input Data/Units 
Keys 
Output Data/Units 
1 
Enter program 

2 
Initialize 

f PRGM 

3 
Enter coefficients and display D 
c 
ENTER 

b 
ENTER 




a 
R/S 
(D) (pause) 
4 
If D >= 0, roots are real 


x_{1} 



R/S 
x_{2} 

or 



If D < 0, roots are complex of form u ± iv 
u 


R/S 
v 

5 
For new case, go to step 3 


Find the solution to x^{2} + x  6 = 0.
Press f PRGM to initialize. Key 6, CHS, ENTER, 1, ENTER, 1, and press R/S. D's value of 6.25 flashes on the display indicating real roots followed by the first root: 3. Pressing R/S displays the 2nd root: 2.
LINE CODE KEYS 00 01 31 ENTER 02 22 roll dn 03 71 ÷ 04 02 2 05 71 ÷ 06 32 CHS 07 31 ENTER 08 15 02 g x^{2} 09 22 roll dn 10 22 roll dn 11 21 x<>y 12 71 ÷ 13 23 00 STO 0 14 41  15 14 74 f PAUSE 16 15 41 g x<0 17 13 31 GTO 31 18 14 02 f sqrt 19 21 x<>y 20 15 41 g x<0 21 13 24 GTO 24 22 51 + 23 13 26 GTO 26 24 21 x<>y 25 41  26 74 R/S 27 15 22 g 1/x 28 24 00 RCL 0 29 61 x 30 13 00 GTO 00 31 32 CHS 32 14 02 f sqrt 33 21 x<>y 34 74 R/S 35 21 x<>y 36 13 00 GTO 00
R0 c/a
Go back to the
software library
Go back to
the main exhibit hall