beautypg.com

HP 32SII User Manual

Page 222

background image

14–6 Solving and Integrating Programs

File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm

before displaying it). If you do want this result displayed, add a VIEW
variable instruction after the SOLVE instruction.

If no solution is found for the unknown variable, then the next program line is
skipped (in accordance with the "Do if True" rule, explained in chapter 13).
The program should then handle the case of not finding a root, such as by
choosing new initial estimates or changing an input value.

Example:

SOLVE in a Program.

The following excerpt is from a program that allows you to solve for x or y by
pressing

W

X or Y.

Program Lines:

Description:

%

%

Setup

for

X.

%

Index

for

X.

%

!

Branches to main routine. Checksum and
length: CCEC 004.5

&

&

Setup

for

Y.

&

Index

for

Y.

&

!

Branches to main routine.

Checksum and length. 2E48 004.5

Main

routine.

!

L

Stores

index

in

i.

/

Defines program to solve.

#1L2

Solves for appropriate variable.

#$1L2

Displays

solution.

!

Ends program. Checksum and length:
E159 009.0

)

)

)

Calculates f (x,y). Include INPUT or
equation prompting as required.

RTN