Posts: 1,092
Threads: 57
Joined: May 2007
I'm about to add keystroke programming to my new calculator design and am wondering whether or not to keep the traditional 4 level RPN stack I have now, or go with an "unlimited" size RPL style stack instead.
Note that the RPL style stack would not include algebraic expression and all that fancy stuff as on the 28/48 etc, it would simply be a large stack with the usual DROP/SWAP etc.
Advantages and disadvantages, comments and insights, and religious flame wars invited :->
Thanks
Dave.
Posts: 151
Threads: 18
Joined: Aug 2007
Just dont forget lastx you will do good :-) When I have had to use non rpn it is that I often has missed...
Posts: 896
Threads: 183
Joined: Jul 2005
The KISS principle would do good.
Posts: 151
Threads: 18
Joined: Aug 2007
Keep it simple would be a no arbitary limit stack with nothing special happening to value in at top of stack and no strange duplicating from bottom (well we are unlimited).... Nae, I take the complicated classic rpn stack...
Posts: 1,619
Threads: 147
Joined: May 2006
Let the user decide.
E.g., some programs efficiently take advantage of the T register copies on roll down. You'd loose that with unlimited stack.
E.g., some of us want to do complex calculations from start to end without thinking about a 4 level stack limit.
I'd have a programmable function that sets the stack depth.
Posts: 302
Threads: 34
Joined: Aug 2007
If you're just going with basic RPN keystroke programming I say stick with a 4-level stack. You honestly won't go wrong either way.
-Hugh
Posts: 1,092
Threads: 57
Joined: May 2007
Quote:
Keep it simple would be a no arbitary limit stack with nothing special happening to value in at top of stack and no strange duplicating from bottom (well we are unlimited).... Nae, I take the complicated classic rpn stack...
I think perhaps the complicated classic RPN stack it is then, as I've already written it, unless someone can convince me otherwise...
It will have Algebraic keystroke programming too, just to keep everyone happy :)
Thanks
Dave.
Posts: 1,092
Threads: 57
Joined: May 2007
Quote:
If you're just going with basic RPN keystroke programming I say stick with a 4-level stack. You honestly won't go wrong either way.
-Hugh
Thanks.
What happened to the case you were working on Hugh?
Dave.
Posts: 302
Threads: 34
Joined: Aug 2007
I have enough free time to finish that up if you need it.
Posts: 4,587
Threads: 105
Joined: Jul 2005
I'd second Egan: Let it have a settable fixed stack depth, .GE. 4.
Posts: 887
Threads: 9
Joined: Jul 2007
The 4-level stack came from a time before calculators were programmable. The assumption was that if there were any more levels, you wouldn't remember what you had on the the stack. That becomes irrelevant however when you use the stack for parameter-passing and intermediate results for multiple nested levels of routines. Even if no routine needs more than four levels itself and, at programming time, you're only concerned with the ones that particular routine uses, at run time it should still be permissible to have many levels underneath from other pending routines. Their presence is harmless regardless of how many there are. I would like to have a lot more than four levels available.
Posts: 1,477
Threads: 71
Joined: Jan 2005
Quote:
The 4-level stack came from a time before calculators were programmable.
While it's true that the first RPN-type calculator, the Friden EC-130, did have 4-levels and wasn't programmable. The first HP calculator had just 3 levels and was programmable, the HP9100A. In the interviewing years (1963-1968) there were just a few other RPN-type calculators made.
Quote:
The assumption was that if there were any more levels, you wouldn't remember what you had on the the stack.
Remembering the stack on any of these calculators was not an issue since they displayed the entire stack. The HP-35 was the first to require the user to "remember" what was on the stack. I think that the major issue in choosing stack depth on the 35 was the cost in silicon to store the data as well as making sure that reasonable complexity expressions could be evaluated without resorting to paper and pencil.
Posts: 875
Threads: 37
Joined: Jul 2005
Quote:
I'd have a programmable function that sets the stack depth.
How about two settings which would be programmable, one that sets stack depth, and one that enables or disables replication of the top level.
Edited: 10 Sept 2007, 12:18 p.m.
Posts: 2,247
Threads: 200
Joined: Jun 2005
Katie,
Cost was indeed a factor. I remember the HP-35 pointing out that the machine has one memory register and a stack of four dynamic registers to store temporary numbers. So in a way, it was like HP's manual was hinting that the machine had 5 registers .. in the era when single-memory registers in non-HP calculators was typical. That's why my first HP calculator was the HP-55 since it had 20 memory registers.
Namir
Edited: 10 Sept 2007, 2:59 p.m.
Posts: 1,092
Threads: 57
Joined: May 2007
Quote:
How about two settings which would be programmable, one that sets stack depth, and one that enables or disables replication of the top level.
The only problem with having adjustable stacks like that is then it's possible for some keystroke programs to only work properly in a certain stack mode. To overcome that I would have to ensure the "stack mode" is stored with each program and have the calc automatically switch to that mode when before the program runs, and also return mode when it's finished.
But I guess I already have this sort of problem by having both RPN and Algebraic keystroke programming support.
Thanks
Dave.