hp calculators
HP 48GII
Algebraic and RPN Operating Modes
Tip!
The most important stack commands in RPN are
DUP
, which copies the number in level 1 to level 2, and
SWAP
, which swaps
the numbers in levels 1 and 2.
DUP
is done by pressing the
`
key, as was described above.
SWAP
is needed in many cases, for
example if you want to divide the number in level 1 by the number in level 2 then you must swap them before pressing the
/
key.
SWAP
is so important that there is a shortcut key for it, just press the right arrow key
™
in RPN mode when you are not editing
anything, and it will swap the numbers in levels 1 and 2.
The command line
As you typed the example in Algebraic and in RPN modes, what you typed went into a special line, below the stack, but above the
menu keys. If you are still in RPN mode, try calculating the price of the carpet again. First type the number 17.32, and the display will
look like this:
Figure
7
The previous result, 70, is on level 1 of the stack. The new number is between the stack and the menu keys, on a special line called
the
Command Line
. Both Algebraic mode and RPN mode use this for numbers and text you are typing or editing. When you press
`
the contents of the command line are evaluated and the result is put on the stack.
In RPN you do not need to press
`
to put a number on the stack, if you are going to use it at once. In the case above, you can
press
`
to put 17.32 on the stack, and then press
*
to multiply 70 by 17.32, but you can skip the
`
and just press
*
to
get the answer. You do need to press
`
if you are typing two numbers one after another, as in the carpet example.
Example – a more complicated expression
Here is a more complicated expression to compare Algebraic and RPN modes further.
√
((3.2*5²)+3!)
In Algebraic mode it is possible to type the expression almost as it stands. The only difference is that the x-squared key
„º
must be pressed before a number, whereas the x-squared symbol is written after the number to be squared. Set Algebraic mode and
type the following:
R„Ü„Ü3.2*„º5™™+3~…2
Figure
8
The square root comes before the number it works on, the multiplication sign comes between the numbers it uses, and the factorial
sign comes after the number it works with. The x-squared symbol was written after the number to be squared, but on the calculator it
had to come before. There are three sets of nested brackets, which have to be treated correctly. Note that when you press
„º
in Algebraic mode the brackets are automatically put in for you. To enter the factorial sign you have to use ALPHA mode
to type the exclamation mark. Even though the calculator makes things easy for you, you still need to take care when typing the
expression. Now press
`
to see the result.
hp calculators
- 6 -
HP 48GII
Algebraic and RPN Operating Modes