Solve Example program for the HP-15C

Description

HP-15C Owner's Handbook - Pages 181-184

This program implements the example shown on pages 181 through 184 of the HP-15C Owner's Handbook Edition 2.4.

The equation f(x) := x2 - 3x - 10 = 0.

Press function key A to find the positive root 5, or function key B to find the negative root -2. If the SOLVE were to fail it would jump to label C and show a blinking 9.

Note: The SOLVE will never fail in this program. The ERROR routine is included to illustrate how programs can catch SOLVE errors. A more complex Solve subroutine could cause solve to fail for certain input ranges.

Program Resources

Labels

Name Description
 A Solve for positive root
 B Solve for negative root
 C Solve ERROR routine
 0 Solve subroutine (implements equation)

Flags

Number Description
9 Set if an error occurs

Program

Line Display Key Sequence Line Display Key Sequence
000 016 22 13 GTO C
001 42,21, 0 f LBL 0 017 42,21,12 f LBL B
002 3 3 018 0 0
003 30 019 36 ENTER
004 20 × 020 1 1
005 1 1 021 0 0
006 0 0 022 16 CHS
007 30 023 42,10, 0 f SOLVE 0
008 43 32 g RTN 024 43 32 g RTN
009 42,21,11 f LBL A 025 22 13 GTO C
010 0 0 026 42,21,13 f LBL C
011 36 ENTER 027 9 9
012 1 1 028 36 ENTER
013 0 0 029 43, 4, 9 g SF 9
014 42,10, 0 f SOLVE 0 030 43 32 g RTN
015 43 32 g RTN