Using _ in a program – HP 15c User Manual

Page 192

Advertising
background image

192 Section 13: Finding the Roots of an Equation

 Many functions exhibit special behavior when their arguments

approach zero. You can check your function to determine values of x
for which any argument within your function becomes zero, and then
specify estimates at or near those values.

Although two different initial estimates are usually supplied when using
_, you can also use _ with the same estimate in both the X- and
Y-registers. If the two estimates are identical, a second estimate is generated
internally. If your single estimate is nonzero, the second estimate differs
from your estimate by one count in the seventh significant digit. If your
estimate is zero, 1×10

-7

is used as the second estimate. Then the root-finding

procedure continues as it normally would with two estimates.

Using _ in a Program

You can use the _ operation as part of a program. Be sure that the
program provides initial estimates in the X- and Y-registers just prior to the
_ operation. The _ routine stops with a value of x in the
X-register and the corresponding function value in the Z-register. If the x-
value is a root, the program proceeds to the next line. If the x-value is not a
root, the next line is skipped. (Refer also to Interpreting Results on page 226
for a further explanation of roots.) Essentially, the _

instruction tests

whether the x-value is a root and then proceeds according to the ―Do if
True‖ rule. The program can then handle the case of not finding a root, such
as by choosing new initial estimates or changing a function parameter.

The use of _ as an instruction in a program utilizes one of the seven
pending returns in the calculator. Since the subroutine called by _
utilizes another return, there can be only five other pending returns.
Executed from the keyboard, on the other hand, _ itself does not
utilize one of the pending returns, so that six pending returns are available
for subroutines within the subroutine called by _. Remember that if
all seven pending returns have been utilized, a call to another subroutine
will result in a display of

Error 5

. (Refer to page 105.)

Advertising