14–10 Solving and Integrating Programs
³
G
variable
The
programmed
³
FN instruction does not produce a labeled display (
³
= value)
since this might not be the significant output for your program (that is, you might
want to do further calculations with this number before displaying it). If you
do
want this result displayed, add a PSE (
|f
) or STOP (
g
) instruction to
display the result in the X–register after the
³
FN instruction.
If the program contains a VIEW or STOP instruction, or a message for display (an
equation with Flag 10 set), then the instruction is normally executed only once — it
is not executed each time the program is called by
³
FN. However, if VIEW or a
message is followed by PSE, then the value or message will be displayed for one
second each time the program is called. (STOP followed by PSE is ignored.)
Example:
³
FN in a Program.
The "Normal and Inverse–Normal Distributions" program in chapter 16 includes
an integration of the equation of the normal density function
.e
2
)(
dD
2S
1
2/
S
MD
D
M
−
−
³
π
The
2))((
2
÷÷− SMD
function is calculated by the routine labeled F. Other routines
prompt for the known values and do the other calculations to find
Q(D), the
upper–tail area of a normal curve. The integration itself is set up and executed
from routine Q:
%
/
³
G
Recalls lower limit of integration.
Recalls upper limit of integration. (X = D.)
Specifies the function.
Integrates the normal function using the dummy variable D.