FN instruction.
 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

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

1 D

 

DM

2

(

 

)

/2

 

S 2π M

e

S

dD.

 

 

The e((D M)S)2 2 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.
14–10Solving and Integrating Programs