The xfunction is used primarily to swap the order of numbers in a calculation. For example, an easy way to calculate 9 ⎟ (13x8) is to press 13 E8 *9 x/.
Arithmetic-How the Stack Does It
The contents of the stack move up and down automatically as new numbers enter the
|
|
| 3 + 4 - 9 : |
|
|
| |||
|
|
|
|
|
| a (lost) | |||
T |
|
|
|
|
|
|
|
| |
| a |
| a |
| a |
| a | ||
Z |
|
|
|
|
|
|
|
| |
| b |
| a |
| b |
| a | ||
Y | 3 |
|
|
|
|
|
|
| |
3 |
| b |
| 7 |
| b | |||
X | E |
|
|
|
|
|
|
| |
4 | + | 7 | 9 | 9 | - | -2 | |||
4 | |||||||||
|
|
|
| Drop | Lift |
| Drop |
(a and b represent values already on the stack.)
Notice that when the stack drops, it replicates the contents of the
When the stack lifts, it pushes the top contents out of the
Because of the automatic movement of the stack, you do not need to clear the display before doing a new calculation.
Most functions (except Eand C) prepare the stack to lift its contents when the next number enters the
270 E: RPN: The Stack
File name :