Sample problems to evaluate RPL vs. RPN "objectively"  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: Sample problems to evaluate RPL vs. RPN "objectively" (/thread87918.html) 
Sample problems to evaluate RPL vs. RPN "objectively"  Gene  02212006 I'd like to ask for input from our community here to see if there are some sample problems we could pose that would allow us to evaluate the effectiveness and efficiency of RPL vs. 4level stack RPN. For example, suppose we said one of the problems was to compute the roots to a quadratic equation given a, b, and c in the stack. I'd like to see the RPN approach and the RPL approach to see if they can be remotely objectively evaluated for clarity, efficiency, and general usefulness to the average (NOTE THAT) user. :) I know that this is not a good sample problem given the built in quadratic function on the 49g+, but I'd like to see if any here have ideas for good sample problems. It might be that we should have a set of problems that are RPN masterpieces vs. those that are easy to do in RPL but not RPN.
Thoughts? Re: Sample problems to evaluate RPL vs. RPN "objectively"  Howard Owen  02212006 I think it is interesting that you are asking the question. 8)
Edited: 21 Feb 2006, 6:26 p.m.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Gerson W. Barbosa  02212006 Hi Gene, I fear the example below for the HP15C is not what you'd expect because an RPN (or RPL) program using only the stack is far from meeting the 'clarify' requirement. Nevertheless, I think it meets the 'efficiency' requirement. Well, it is hard to have both. Furthermore, the HP15C is an exceptional calculator. Perhaps I should have written an HP11C version (or even an HP12C one!). That's one of the programs that are written in the last blank pages of my HP15C manual. I wrote it in 1984 when I knew RPN even less than I know today. The RPL version would be straightforward and quite easy to read. Regards, Gerson.
Assuming a, b and c in the stack, after running the program the stack will contain x1 and x2. Steps 24, 26, 33 and 35 are only necessary because CHS in complex mode does not change the sign of the argument (a bug or because of a reason unknown to me?). To achieve this it is necessary to multiply the argument by 1.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Les Bell  02212006 The one that interests me, and I've been trying to find time to write up, is section 96 of "The Feynman Lectures on Physics". This is simply a numerical solution of a firstorder differential equation (mass on spring) and produces Table 91, which lists displacement, velocity and acceleration against time. I've done it on the 41, and I've done it in Perl. I haven't had time to tackle it on the 48 yet  at least, numerically/programmatically. On the other hand, I was able to enter the equation into the differential equation solver on the 48, and get a nice graph, too. Which method is better probably depends on why you are solving the problem. The goal might be a numerical solution to the problem, or it might be to develop some intuition as to what is going on in the physical system. Which approach works better for which goal is left as an exercise for the reader. ;) Best,
 Les Re: Sample problems to evaluate RPL vs. RPN "objectively"  James M. Prange (Michigan)  02212006 Does this "average" user ordinarily use Classic RPN, or RPL, or perhaps neither?
Regards, Re: Sample problems to evaluate RPL vs. RPN "objectively"  Gene Wright  02212006 Well, "average" user is tough to define. I can write/use 4level RPN and RPL, but there are times when I'm much happier using a normal RPN machine than an RPL one. So, I'm just wondering if we can come up with some sample problems that really, really point out the differences between them. What are some areas where the 4level stack / classic RPN really shows off? What are some areas/problems where the RPL system would be very difficult to do in the 4level stack.
We can argue about it all day, but I'm wondering if we can come up with some good illustrations to help.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Palmer O. Hanson, Jr.  02212006 I think that we need to agree on what "effectivenss" and "efficiency" mean and how we separate out the characteristics of the machine from the characteristics of the algorithm. For example, pages 205ff of the HP15C Advanced Functions Handbook defines the quadratic as c 2bz + + az^2 = 0 which allows some efficiency in calculation at the cost of defining a quadratic in a way which is different from the traditional way. For effectivness the 39 step routine on pages 205206 of the HP15C Advanced Fuynctions Handbook uses a different algorithm which avoids destructive cancellation for difficult problems. What if you used the old Mach Number problem?
Evaluating RPL vs. RPN: Area between two curves  Karl Schneider  02222006 Hello, Gene  A very illustrative example, IMO, was discussed two years ago: This problem was revisited in a stupendously lengthy thread that ran during November 2005 in Archive #15. Regards,  KS
Edited: 22 Feb 2006, 9:39 p.m.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Thomas Radtke  02222006 Quote:I have a very simple example: Add I% interest of A to A ( =A(1+I%) ). That is on RPN
A while on RPL, it is required to do something like
A See? You save one keypress, that is nearly 17% of the total work. If you do nothing else 8 hours a workday, you save more than one hour per day. Clearly, this shows the superiority of RPN;).
Thomas
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Palmer O. Hanson, Jr.  02222006 The interest problem is a terrible example. It says that if you are a key punch operator then RPN is clearly the way to go. What if you are an engineer?
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Valentin Albillo  02222006 Hi, Gene: Gene posted:
"I'd like to ask for input from our community here to see if there are some sample problems we could pose that would allow us to evaluate the effectiveness and efficiency of RPL vs. 4level stack RPN."
average (NOTE THAT) user. :)"
D=SQR(B*B4*A*C) @ (B+D)/2/A, (BD)/2/Awhich can run rings around any RPN or RPL version in terms of efficiency and simplicity, requires no mental conversion, and requires no programming, just a commandline statement. Anyway, if you still insist in comparing a once useful but now obsolete system to perform calculations to an aberrant, obfuscated system to do the same, you should focus in programs which show off their differences to the best. For instance, if you want to highlight RPN, you must seek examples which:
etc, etc, etc. I'm glad if any of these comments of mine can be of any help to your quest, but for the reasons mentioned at the beginning, I wouldn't waste much time on this. Best regards from V.
Edited: 22 Feb 2006, 6:59 a.m.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Valentin Albillo  02222006 Hi, Gerson: Gerson posted:
"[...] CHS in complex
There's an acronym for this, IIRC, something like RTFM ... :)
Best regards from V.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Gerson W. Barbosa  02222006 You are right. I remember I saw the quadradic solver on the HP15C Advanced Functions Handbook mentioned here some time ago and how it handled difficult examples. Too bad at the time the complementary handbook was not available here, neither was it available in Portuguese I think. I need to remember to have the 15C Advanced Functions on the Museum DVD printed out. The difference between "effectiveness" and "efficiency" is something I still have to learn. I was asked this at least a couple of times at college but I never remember the subtleties. ('Eficiência' vs. 'Eficácia'  Prof. Vieira? )
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Thomas Radtke  02222006 Quote:Then I would have the insight that Q=1+I% can easily be calculated in mind and end up with typing
A which works on both systems and is not only as much as effective but also highly efficient;P. (My post was probably not the most serious response to Gene's request, sorry for that:).
Thomas
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Gerson W. Barbosa  02222006 Hi Valentin, Yes, as I have recognized in an earlier post, I should have read the other handbook. But, in this case, the answer seems to be in the standard manual. I have surely read this section already, I just may have forgotten about the content. Anyway, there's no problem in reminding me this: I always translate RTFM as Read the Fine Manual, which, in the case of HP manuals, is always true! :) Best regards,
Gerson.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Valentin Albillo  02222006 Hi again, Gerson: Gerson posted:
"I always translate RTFM as Read the Fine Manual"
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Han  02222006 I only recently read about the differences between RPN and RPL (and by no stretch am an expert in either). I think that the example below is not quite 'objective' enough. For one, not all calculators have a key dedicated to the % operation. On some implementations of RPL (for example, the HP48 series), there are commands that are accessed via menus. Taking a look at just the keyboard layout of the 41C (I've never used one myself), I do not see a % operation there. Presumably, this is accessible either by menu or catalog of some sort. Likewise, the DUP command on an HP48 can be accessed via the stack operations menu. Thus A ENTER ENTER I % + could easily be A DUP I % + where DUP is from the menu key. Comparisons in terms of the number of keystrokes (because this will be highly dependent on the keyboard layouts of the implementations of RPN and RPL) might not be the most fair comparison. In fact, comparing RPN on one machine with RPN on a different machine may produce a different number of keystrokes. Also, when doing routine calculations, we're more likely to write a program to do the repetitive tasks.
Quote:
Edited: 22 Feb 2006, 2:43 p.m.
Re: Sample problems to evaluate RPL vs. RPN "objectively"  Massimo Gnerucci (Italy)  02222006
Quote: [shift]Rolldown (G key) Greetings, Massimo Re: Sample problems to evaluate RPL vs. RPN "objectively"  Thomas Radtke  02232006 Quote:In that case, the function key to which % is assigned to becomes functionally a % key, right? Quote:That would mean to switch between stack and math/real menus all the time. Effective but not very efficient:). Quote:I dare to say that you can overcome nearly any shortcoming of one of the systems by programming a handy shortcut. But you actually have to do this and you have to take that work into account when estimating something like 'efficiency'.
Thomas
