# HP Forums

Full Version: RPN Tutorial
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

In light of the HP 15C LE, it is my hope that there are new users of RPN calculators, either through the HP 15C, or by an Andriod (sp?) or iPhone/iPad app. This is a short "do by example" tutorial on basic RPN that I posted on my blog. It is not towards any specific calculator in hopes that newbies can learn from it whatever RPN machines/emulators they have.

I am thinking of doing a basic keystroke programming tutorial (15C, 12C, or if anyone has a request, I'll try cater to that calculator instead - note my 41C is in repairs, I don't have a 42 (but I have Free42), and I don't have an Andriod device). Please check out the blog and me know what you think.

Eddie

Edited: 25 Sept 2011, 1:56 a.m.

Hello Eddie,

Nice. You may include this graph: RPN STACK PERMUTATIONS

Regards.

Hi Eddie,

I think it's a good idea to familiarize others with the benefits of RPN. However, some errors should be removed:

RPN uses one stack that consists of (usually) four registers X, Y, Z and T.

"Typically, RPN calculators uses four stacks, named X, Y, Y, and Z."

"Typically, RPN calculators use a stack consisting of four registers, named X, Y, Z, and T."

So, X, Y, Z and T are four registers (not stacks), each register stacked on top of the other. That's why the whole arrangement is called a stack.

Maybe an RPN novice will get the idea behind the stack more quickly if the examples show intermediate results. For instance like this (example #5):

```  2  [1/x]           0,5000
3 [ENTER] 7 [÷]    0,4286
[+]                0,9286
25 [ENTER] 64 [÷]  0,3906
[sqrt]             0,6250  ; use the symbol instead - there is no key labelled "sqrt"
[-]                0,3036  ; do not omit the leading zero - it's displayed
```

Re. Enter: about 30 years ago I had a book on RPN that described the idea behind the ENTER key in two-argument calculations this way: ENTER is required to tell the calculator that you have completed number entry. So 5 ENTER 3 enters two numbers five and three instead of a 53, thus separating the 5 from the 3. This also means that an ENTER is not required before or after a numeric operation, before or after a STO or RCL, before or after Pi, etc.: in all these cases it's clear that the current number resp. result is complete, and everything keyed in next will belong to a new number. So the first ENTER in your example #5 is obsolete since after 1/x the calculator knows that the result (1/2) is complete and the following 3 belongs to a new number.

This idea was very helpful for me in the first weeks after I aquired my brand new 34C back then. Maybe you will find it useful as well. I really like the idea to help new RPN users the way you intended. That's why I suggest these improvements. :-)

Dieter

Thanks Dieter and Xaiver not only for the suggestions but also finding the errors. Xaiver, I want to study the diagram closer so I can understand it.

Nice work :-) For the example with the square root of the sum of squares, however, I'd prefer

```3
ENTER
x
4
ENTER
x
+
[sqrt]
```

... which will not work on the 20b or 30b in RPN mode.

One more reason why I dislike RPL, also camouflaged.

However, the above method (3 ENTER X etc...) works on the WP-34S.

Eight keystrokes!!! That's way too complicated, Walter. ;-)

In cases like these I usually type

``` 3 ENTER 4  R-P
```
or even
```  3 i 4  ABS
```
Both suggested methods also provide better precision than a manual calculation. So this rectangular-polar conversion stuff (which I don't use at all otherwise) finally makes some sense to me. ;-)

Dieter

Since we did our best to make it RPN :-)

You're right absolutely, Dieter :-) Please compare, however, also with the ten keystrokes in Eddie's original tutorial, take 2. After all, your solution is the best :-)