The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

RPN vs ALGEBRA programming
Message #1 Posted by E Samuel Levy on 3 Mar 2007, 10:12 a.m.

I can see RPN when you have constraints of program size and processor speed. When given a formula you don't understand and none of the constraints apply I can see it is simply easier to slavishly insert it as written.

      
Re: RPN vs ALGEBRA programming
Message #2 Posted by Eddie Shore on 3 Mar 2007, 10:35 a.m.,
in response to message #1 by E Samuel Levy

For the 48/49/50 series, I tend to do simple tasks in RPN, but if I have a really complicated formula, I will use the ' deliminiters.

      
Re: RPN vs ALGEBRA programming
Message #3 Posted by bill platt on 3 Mar 2007, 10:51 a.m.,
in response to message #1 by E Samuel Levy

"When given a formula you don't understand "

This is a problem regardless of the input-action logic paradigm.

            
Re: RPN vs ALGEBRA programming
Message #4 Posted by Walter B on 3 Mar 2007, 10:55 a.m.,
in response to message #3 by bill platt

Couldn't agree more d:-)

                  
Re: RPN vs ALGEBRA programming
Message #5 Posted by Maximilian Hohmann on 3 Mar 2007, 12:41 p.m.,
in response to message #4 by Walter B

Hello!

Quote:
Couldn't agree more d:-)

I wouln't say that. I don't understand Maxwell's equations or Hilbert transforms (or even Einsteins e=m*c^2 as simple as it may look), but I could easily program them on any computer...

Greetings, Max

      
Re: RPN vs ALGEBRA programming
Message #6 Posted by Karl Schneider on 3 Mar 2007, 1:57 p.m.,
in response to message #1 by E Samuel Levy

Hi, "Sam" --

Quote:
I can see RPN when you have constraints of program size and processor speed. When given a formula you don't understand and none of the constraints apply I can see it is simply easier to slavishly insert it as written.

I'm not quite sure what your "thesis statement" is, but my take on the matter is to use equation-based programming when the formula is simple and straightforward, and use keystroke programming when the formula or calculation is lengthy, intricate, or more difficult to implement.

Keystroke programming allows conditional tests, flags, branching, and debugging by single-step execution. Keystroke programs also run faster than equations.

The calculator models in which the user has a choice between equation-based and keystroke-entry programs are the HP-32SII, HP-33S, and the RPL-based HP-28/48/49/50. RPL programs, however, are completely different in form and lack single-step execution.

Now, about RPN versus AOS keystroke programs: The AOS program may not show each and every intermediate result, and is generally not different in sequence of entry from the algebraic expression. As a program, wouldn't a user rather see

X*(Y+(Z/T))-W

instead of the following?

RCL X
*
(
RCL Y
+
(
RCL Z
/
RCL T
)
)
-
RCL W
=

The keystrokes are almost identical, but the only advnatage of the keystroke program is the availability of intermediate results by single-step execution.

-- KS


[ Return to Index | Top of Index ]

Go back to the main exhibit hall