The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

My favorite short RPL program
Message #1 Posted by Tom Barber on 9 Sept 2006, 9:40 p.m.

Hi! I'm new to this forum, and joined partly to take advantage of the classified ADs. But here is a short RPL program that I think is pretty cool, notwithstanding that it is already implemented as a built-in command in my calculator.

The Euclidean algorithm for finding the greatest common divisor of two integers is recursive. GCDx calls itself:


I like this because in one very short program you have a natural implementation of an algorithm that is naturally recursive, using the IFTE command to either halt or continue the recursion, and using lists instead of embedded programs for the arguments to IFTE.

I have written a book, which is a user's guide for the 48g/49g/50 series. If you are interested, there is more information in the classified ads section, or at least I hope that there will be as soon as the moderator has approved it.

Re: My favorite short RPL program
Message #2 Posted by Bruce Horrocks on 10 Sept 2006, 6:29 a.m.,
in response to message #1 by Tom Barber

I was able to have a quick flick-through Wlodek's copy at the HPCC Club meeting in London yesterday. While by no means a review, my immediate impressions were positive:

  • It's a good book for a newcomer to the machine. It seems to strike the right balance between being short-enough (and therefore thin enough) not to deter readers, but containing enough information and detail to be useful.
  • It's good that new books about the 50G are coming out. The User Guide, with its need to cover what rapidly becomes trivial and second-nature to the user, can be too dry to learn from. Just having an alternate point of view makes all the difference as a few key topics can be presented in a bit more detail. The book also adds weight to the 50G as a machine - it's not just an HP product but something that is actively supported by the marketplace.
Re: My favorite short RPL program
Message #3 Posted by Tom Barber on 10 Sept 2006, 10:35 p.m.,
in response to message #2 by Bruce Horrocks


I am experiencing a mixed reaction to your comments. On the one hand, I appreciate that your overall impressions were “positive”, which is manifestly better than the alternative. On the other hand, I was a little surprised to see a summary opinion volunteered in a moderately peremptory manner by someone whose experience with the book amounts to a “quick flick-through”. I stumbled over the phrasing, and was unsure whether you intended to relegate in total the material that I covered to the status of material that “rapidly becomes trivial and second-nature to the user”. I eventually decided that you possibly did not mean that exactly, but I could never decide what to make of the last phrase of that sentence, i.e., “too dry to learn from”.

An accurate, matter-of-fact characterization of my book would be to say that it is very carefully written and unusually thorough in its treatment of those essential features that are within the scope of the undertaking. There is no question that many experienced users will find a significant portion of it downright boring. Yet, I have confidence that many, perhaps the majority, of experienced users will nevertheless find my book useful and desirable, for any of several reasons. The treatment that I give, to many specific topics, is so much more complete than that available elsewhere, that many experienced users may discover a useful improvement to their understanding of various topics. Experienced users who do not sleep with their calculator under their pillow and who forget how to use certain essential features of the calculator from time to time, will appreciate a narrative explanation that is handy and that will quickly refresh their memory of how to use those essential features.

Genuine experts such as you excluded, users in general and novice users in particular who find themselves dissatisfied with the smattering of knowledge offered by the standard manuals, will likely appreciate the thorough, exact presentation that offers a fast track to gaining intimate familiarity with the use of the calculator. (And if there is one craving that we all share, it is the desire to be intimate with our calculators.)

If the moderators are inclined to indulge me, I will provide an excerpt or two, so that anyone who happens to be curious, will be better able to make an informed opinion as to whether it is likely to be useful to them. Since this forum is mostly attended by people who would be bored with any excerpt that only novice users could appreciate, I will endeavor to avoid that in the excerpts, even though that risks giving novice users the impression that the book will be over their heads.

The first excerpt will deal with the CAS modes Numeric and Approx, and will appear in a post following this one.



Edited: 10 Sept 2006, 10:42 p.m.

Re: My favorite short RPL program
Message #4 Posted by Cameron Paine on 10 Sept 2006, 11:19 p.m.,
in response to message #3 by Tom Barber

Tom, Bruce can no doubt tell us his intention however my original reading of the phrases that trouble you connected them to the HP-supplied User Guide. I took his meaning to be that your offering served to counter the drawback's of a generic user guide.

I re-read Bruce's posting after I read your reaction to it. My original interpretation is unchanged.

Just one reader's observation.


Re: My favorite short RPL program
Message #5 Posted by Steve Borowsky on 11 Sept 2006, 5:43 a.m.,
in response to message #4 by Cameron Paine

I agree with Cameron Bruce is clearly referring to the HP supplied manuals as having by necesitty to cover the basics which become second nature and to be too dry to learn from, not your book.

I appreciate what you're doing and see the need for it; back in the old days HP manuals were as well designed as the calculators, and matched their sophistication where necessary. As the calculators became more sophisticated it seemed HP was unwilling to put forth the effort necessary to preserve that tradition. Bill Wickes' books went a long way toward solving that problem for the 28/48 but when the 49 came out the problem got far ahead of the solution.

I've read your excerpts and they're excellent. I think this book will be like finding a paved road in a jungle for many 49/50 users and potential users. I'm much more likely to buy a 50g now that I know there's a source of accurate thorough and concise information to help me along. Thanks for the effort it took to do it.

Re: My favorite short RPL program
Message #6 Posted by Bruce Horrocks on 11 Sept 2006, 8:51 a.m.,
in response to message #5 by Steve Borowsky

Tom: you have misunderstood my point. It is the User Guide that I said was too dry to learn from. This is not to disparage HP's efforts, it is merely to point out an inevitable aspect of any user guide, which is that a user guide is required to explain every little point to a new user. Once a user is no longer "new" then going back over the same basic material, in order to glean new information that was missed first or second time through, is tiresome. In short: the reward from re-reading a user guide does not justify the effort.

This is where your book comes in: you've made that effort on behalf of the user and distilled all the important information into a much more concise format. I'm pleased that you've posted excerpts so that people can see for themselves and I have to say I agree wholeheartedly with Steve's "paved road in a jungle" analogy. If only I'd thought of that phrase then it would have saved this thread!

My thanks to Cameron and Steve for leaping to my defence so quickly.

Re: My favorite short RPL program
Message #7 Posted by John Cadick on 11 Sept 2006, 9:35 a.m.,
in response to message #1 by Tom Barber


I may have hit a glitch in the forum software because when I try to respond to your ad by email, I get a funny message telling me that my ad is not complete and I have to post my address, etc etc.

Anyway, I am interested in the book (per your ad). Please email the information at j cadick at cadick . com. Make the obvious changes.


Edited: 11 Sept 2006, 9:36 a.m.

[ Return to Index | Top of Index ]

Go back to the main exhibit hall