HP Prime Graphing Calculator User Manual

Page 54

Advertising
background image

50

Reverse Polish Notation (RPN)

If there are no entries in history and you enter an operator or
function, an error message appears. An error message will also
appear if there is an entry on a stack level that an operator needs
but it is not an appropriate argument for that operator. For
example, pressing

f

when there is a string on level 1 displays

an error message.
An operator or function will work only on the minimum number
of arguments necessary to produce a result. Thus if you enter on
the entry line 2 4 6 8 and press

s

, stack level 1 shows 48.

Multiplication needs only two arguments, so the two arguments
last entered are the ones that get multiplied. The entries 2 and 4

are not ignored: 2 is placed on stack level 3 and 4 on stack level

2.
Where a function can accept a variable number of arguments,
you need to specify how many arguments you want it to include
in its operation. You do this by specifying the number in
parentheses straight after the function name. You then press

E

to evaluate the function. For example, suppose your

stack looks like this:

Suppose further that you want to determine the minimum of just
the numbers on stack levels 1, 2, and 3. You choose the MIN

function from the MATH menu and complete the entry as
MIN(3). When you press

E

, the minimum of just the last

three items on the stack is displayed.

Advertising