HP 30b HP 20b Business Consultant and HP 30b Business Professional User's Guid - Page 22

Last Number, Level 4 of the stack remains unchanged.

Page 22 highlights

In Figure 3, the stack contains four numbers, 23, 41, 12, and -15. Each level (1- 4) contains I one number. When a number is typed and entered into the stack by pressing , this new number is "pushed" into level one of the stack, and each number already in the stack moves up one level. The number in Level 4, -15, is pushed out and is lost. + When an operation is performed on the stack, addition ( ) for instance, the calculator "pops" or moves the two numbers from the bottom levels (Levels 1 and 2) out of the stack, performs the operation, and "pushes" the results back into the stack. + With the numbers entered into the stack as shown in Figure 3, pressing changes the stack as shown in Figure 4. Note that when the numbers are "popped" out to add 23 and 41, Level 4 of the stack remains unchanged. -15 -15 12 64 Figure 4 The RPN Stack of Figure 3 Shown After the Addition Operation Last Number Each time you perform a mathematical operation, the content of Level 1 of the stack is saved. :d Pressing recalls that number. This functionality can be used to undo an erroneous key press, or if you want to reuse a number, such as 56.123 in the expression: (---1---.-2--(-3-5---6-+--.--1-5--2-6--3-.-1-)--2---3----) See Table 2-2 for an example using the last number function. 14 Mathematical Calculations

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114

Mathematical Calculations
14
In Figure3, the stack contains four numbers, 23, 41, 12, and –15. Each level (1– 4) contains
one number. When a number is typed and entered into the stack by pressing
I
, this
new number is "pushed" into level one of the stack, and each number already in the stack
moves up one level. The number in Level 4,
–15
, is pushed out and is lost.
When an operation is performed on the stack, addition
(
+
)
for instance, the calculator
"pops" or moves the two numbers from the bottom levels (Levels 1 and 2) out of the stack,
performs the operation, and "pushes" the results back into the stack.
With the numbers entered into the stack as shown in Figure 3, pressing
+
changes the
stack as shown in Figure 4. Note that when the numbers are "popped" out to add 23 and 41,
Level 4 of the stack remains unchanged.
Figure 4
The RPN Stack of Figure 3 Shown After the Addition Operation
Last Number
Each time you perform a mathematical operation, the content of Level 1 of the stack is saved.
Pressing
:d
recalls that number. This functionality can be used to undo an erroneous
key press, or if you want to reuse a number, such as 56.123 in the expression:
See Table 2-2 for an example using the
last number
function.
-15
-15
12
64
1.23
56.123
+
(
)
56.123
(
)
-------------------------------------