The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Four-Level RPN and the Real World
Message #1 Posted by Matt Agajanian on 12 Dec 2013, 4:46 p.m.

Hello there.

Please humour me on this one.

After seeing the posts about the Batman graph posted here a few weeks ago and the fact that the WP-34S can be configured with an 8-register stack, I got to wondering about just how complex the equations in the physical, biological, medical, etc. sciences really are.

So, with that said, just how is it that four levels of an RPN stack are sufficient for application and usage in the mathenatics for the sciences?

Or, are the mathematics in the sciences not that complex being that everthing from the HP-65 to the HP-41 and afterwards has sufficed for use in the real world?

Edited: 12 Dec 2013, 4:49 p.m.

      
Re: Four-Level RPN and the Real World
Message #2 Posted by Walter B on 12 Dec 2013, 4:52 p.m.,
in response to message #1 by Matt Agajanian

Hi there,

Quote:
how is it that four levels of an RPN stack are sufficient for application and usage in the mathenatics for the sciences?
They aren't. They are sufficient for the majority -- but I've experienced problems every once and a while requiring at least five levels. Presumably six levels would catch all problems worked inside out. The reason why the WP 34S features eight levels is complex domain.

d:-)

            
Re: Four-Level RPN and the Real World
Message #3 Posted by Matt Agajanian on 12 Dec 2013, 4:57 p.m.,
in response to message #2 by Walter B

Please enlighten me. Just what range of calculations are you speaking of?

      
Re: Four-Level RPN and the Real World
Message #4 Posted by Geir Isene on 12 Dec 2013, 4:55 p.m.,
in response to message #1 by Matt Agajanian

A 4-level RPN stack + a couple of storage registers does the trick

            
Re: Four-Level RPN and the Real World
Message #5 Posted by Raymond Del Tondo on 12 Dec 2013, 5:46 p.m.,
in response to message #4 by Geir Isene

Quote:
A 4-level RPN stack + a couple of storage registers does the trick
"A couple of storage registers" simply means missing stack levels. Not a problem with a virtually unlimited stack;-)
                  
Re: Four-Level RPN and the Real World
Message #6 Posted by Geir Isene on 12 Dec 2013, 6:05 p.m.,
in response to message #5 by Raymond Del Tondo

Except there are advantages to have storage registers in certain situations where a virtually unlimited stack is cumbersome and lacking the neatness of the 4-level stack. And so I really do prefer the HP-41 over the RPL machines like the 48 - from simple calculations to really complex ones.

                        
Re: Four-Level RPN and the Real World
Message #7 Posted by Raymond Del Tondo on 12 Dec 2013, 7:33 p.m.,
in response to message #6 by Geir Isene

Quote:
Except there are advantages to have storage registers in certain situations where a virtually unlimited stack is cumbersome and lacking the neatness of the 4-level stack.
As written above, not a problem with a virtually unlimited stack. You can limit stack usage as you like, and you can use variables and "register" arithmetic for calculations in combination with an unlimited stack, too.

With an unlimited stack, you are just not...ahem, limited;-)

                              
Re: Four-Level RPN and the Real World
Message #8 Posted by Geir Isene on 12 Dec 2013, 7:51 p.m.,
in response to message #7 by Raymond Del Tondo

Still there are many times I would prefer the T-register behavior of a 4-level stack and that it rolls around on only four levels. The use of fixed registers is of course a feature beyond the stack in that they are... fixed :-)

                                    
Re: Four-Level RPN and the Real World
Message #9 Posted by Walter B on 13 Dec 2013, 1:23 a.m.,
in response to message #8 by Geir Isene

So an eight level stack is a good compromise: featuring D-level repetition AND high enough four all formulas.

d:-)

                                          
Re: Four-Level RPN and the Real World
Message #10 Posted by Gerson W. Barbosa on 13 Dec 2013, 5:55 a.m.,
in response to message #9 by Walter B

Quote:
high enough four all formulas.
              ^^^^
The spelling might indicate an unconscious preference for the superior 4-level stack :-)

                                                
Re: Four-Level RPN and the Real World
Message #11 Posted by Walter B on 13 Dec 2013, 6:22 a.m.,
in response to message #10 by Gerson W. Barbosa

So sorry, Mr. Freud ;-)

                                          
Re: Four-Level RPN and the Real World
Message #12 Posted by gene wright on 13 Dec 2013, 8:43 a.m.,
in response to message #9 by Walter B

Yes, it IS a very good compromise. Just one of the many excellent design decisions made in the 34S.

      
Re: Four-Level RPN and the Real World
Message #13 Posted by Nick_S on 13 Dec 2013, 6:09 a.m.,
in response to message #1 by Matt Agajanian

Your RPN formulae can address registers of which there are 67 in an HP-15C, for example. These can be used to represent the variables in more complex calculations with intermediate storage when more than a couple of stack levels are required.

Edited: 13 Dec 2013, 6:32 a.m.

      
Re: Four-Level RPN and the Real World
Message #14 Posted by Marcel Samek on 13 Dec 2013, 2:29 p.m.,
in response to message #1 by Matt Agajanian

If I am just evaluating an equation and entering values in as necessary, then a 4 level stack can be sufficient for quite complex equations. However, if I enter values that are then reused in the equation multiple times, it is a different story.

In the first case, you are using the RPN stack to perform operations and hold intermediate results, which it is well designed for, is efficient and elegant.

In the second case you are using the stack to juggle input data as well as perform operations and hold intermediate results and that can cause a lot of grief, depending on the number of input variables and where in the equation they happen to be (re)used.

I find that a lot of stack manipulation and use of registers happens not because of the complexity of an equation, but because of the desire to move data around to put it into place for the equation. I think of those as unrelated problems.

            
Re: Four-Level RPN and the Real World
Message #15 Posted by Manolo Sobrino on 13 Dec 2013, 3:57 p.m.,
in response to message #14 by Marcel Samek

That's why some kind of formula evaluation capability makes a lot of sense. RPN makes single evaluation straightforward (and so much fun), but reusing the algebra means you have to write a program. That's fine if I have to perform the calculation 100 times, but what if I need it just twice? It isn't really cost-effective... I always keep around a formula calculator for this. In an EOS calculator you'd just get back, edit the line and evaluate again. Keeping simple things simple has its beauty too.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall