Page 21-18
As you can see, y is used first, then we use b, g, and Q, in that order.
Therefore, for the purpose of this calculation we need to enter the variables in
the inverse order, i.e., (do not type the following):
Q ` g `b `y `
For the specific values under consideration we use:
23 ` 32.2 ` 3 `2 `
The program itself will contain only those keystrokes (or commands) that result
from removing the input values from the interactive calculation shown earlier,
i.e., removing Q, g, b, and y from (do not type the following):
y ` b *„º g *2* Q „º™/
and keeping only the operations shown below (do not type the following):
` *„ *2* „º™/
Unlike the interactive use of the calculator performed earlier, we need to do
some swapping of stack levels 1 and 2 within the program. To write the
program, we use, therefore:
‚å Opens program symbols
* Multiply y with b
„º Square (b⋅y)
* Multiply (b⋅y)
2
times g
2*
Enter a 2 and multiply it with g⋅ (b⋅y)
2
„°@)STACK @SWAP@ Swap Q with 2⋅g⋅ (b⋅y)
2
„º Square Q
„°@)STACK @SWAP@ Swap 2⋅g⋅ (b⋅y)
2
with Q
2
/ Divide Q
2
by 2⋅g⋅ (b⋅y)
2
` Enter the program
The resulting program looks like this:
«
* SQ * 2 * SWAP SQ SWAP / »
Note: When entering the program do not use the keystroke ™, instead use
the keystroke sequence: „°@)STACK @SWAP@.