[net.misc] HP Calculator Stack Depth

malcolm (01/05/83)

#N:pur-ee:6900013:000:216
pur-ee!malcolm    Jan  4 12:59:00 1983

Does anybody know why HP has limited the stack on their calculators to
only four deep.  This has always seemed arbitrarily small, especially in
these days of cheap memory.

						Malcolm Slaney
						Purdue EE Dept.

jlw (01/07/83)

~v
Hmmm.  Looks like I'm on my own.

The fundamental reason for not having more than 4 registers in the stack
is that it wouldn't save you any keystrokes.
I paraphrase from something I picked up at the bookstore here where I bought
my HP-15C and HP-16C: PPC Journal, Special Issue B, 1979.
Given the problem
                   1.2
                1.4
             1.6
          1.8
         2
using a four-level stack the solution is
1.4 E^ 1.2 y^x 1.6 x<>y y^x 1.8 x<>y y^x 2 x<>y y^x
which is a 13 step solution, counting quatities as signle steps.
A five-level stack gives
2 E^ 1.8 E^ 1.6 E^ 1.4 E^ 1.2 y^x y^x y^x y^x
which is also 13 entries.  Hence, no advantage.
If you need a larger stack for intermediate results, use the addressable
storage regsiters; that's what they are there for.
I think I'd have trouble keeping track of where everything in a large
stack was, and end up starting over more than once.

The observant among you may wonder what a 1979 PPC Journal was doing
in a bookstore selling 1982 calculators.  I wonder as well.
Those of you who are too observant noticed that 'single' was misspelled.
A thousand pardons for that transgression of netiquette.

					Jeff Woolsey
					University Computer Center
					...!stolaf!minn-ua!jlw
					...!pur-ee!minn-ua!jlw

csc (01/07/83)

I believe another reason that the stack is shallow is to make the
R(up) and R(down) [rotate stack up and down] more usable.
Jan