RPN Tutorial « Next Oldest | Next Newest »

 ▼ Eddie W. Shore Posting Freak Posts: 764 Threads: 118 Joined: Aug 2007 09-25-2011, 01:49 AM 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. ▼ Xavier A. (Brazil) Member Posts: 103 Threads: 11 Joined: Nov 2008 09-25-2011, 09:39 AM Hello Eddie, Nice. You may include this graph: RPN STACK PERMUTATIONS Regards. Dieter Senior Member Posts: 653 Threads: 26 Joined: Aug 2010 09-25-2011, 11:47 AM 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. Your text however says: "Typically, RPN calculators uses four stacks, named X, Y, Y, and Z." Instead, it should read: "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 ▼ Eddie W. Shore Posting Freak Posts: 764 Threads: 118 Joined: Aug 2007 09-26-2011, 01:34 AM 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. ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 09-26-2011, 01:54 AM 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] ``` instead of using y^x. ▼ Marcus von Cube, Germany Posting Freak Posts: 3,283 Threads: 104 Joined: Jul 2005 09-27-2011, 12:15 AM ... which will not work on the 20b or 30b in RPN mode. ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 09-27-2011, 01:50 AM One more reason why I dislike RPL, also camouflaged. ▼ Eddie W. Shore Posting Freak Posts: 764 Threads: 118 Joined: Aug 2007 09-27-2011, 09:34 AM However, the above method (3 ENTER X etc...) works on the WP-34S. ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 09-27-2011, 02:43 PM Since we did our best to make it RPN :-) Dieter Senior Member Posts: 653 Threads: 26 Joined: Aug 2010 09-27-2011, 11:11 AM 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 ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 09-27-2011, 02:49 PM 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 :-)

 Possibly Related Threads... Thread Author Replies Views Last Post HP Prime Tutorial #6 and #7: Drawing Eddie W. Shore 2 1,523 12-10-2013, 08:16 AM Last Post: Eddie W. Shore HP Prime Tutorial #4 is up (CASE/CHOOSE/INPUT) Eddie W. Shore 1 1,035 11-15-2013, 07:32 AM Last Post: Davi Ribeiro de Oliveira HP Prime Programming Tutorial #3: WHILE, INPUT, KILL, REPEAT, GETKEY Eddie W. Shore 5 1,842 11-07-2013, 12:25 AM Last Post: Han [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 1,931 11-05-2013, 02:44 AM Last Post: Marcus von Cube, Germany HP Prime Programming Tutorial #1: LOCAL, RETURN Eddie W. Shore 6 2,355 10-26-2013, 08:42 PM Last Post: Miguel Toro HP Prime Programming Tutorial #2: MSGBOX, IF-THEN-ELSE, PRINT, FOR Eddie W. Shore 0 996 10-26-2013, 03:51 PM Last Post: Eddie W. Shore HP 39gii Programming Tutorial Part 7 Eddie W. Shore 0 793 04-05-2013, 11:10 PM Last Post: Eddie W. Shore HP 39gii Programming Tutorial Part 6: Interactive Programs Eddie W. Shore 0 729 04-01-2013, 06:00 PM Last Post: Eddie W. Shore HP 39gii Tutorial Part 5 Up (finally) Eddie W. Shore 1 976 03-31-2013, 02:21 AM Last Post: Gilles Carpentier HP 39gii Tutorial: REPEAT and WHILE Eddie W. Shore 6 1,743 03-20-2013, 06:35 PM Last Post: C.Ret

Forum Jump: