Hi;
One curiosity (or chalenge): given three numbers A, B and C in the stack (X-, Y- and Z- registers) what's the shortest way to get (A+B+C), A, B and C in any order in the stack by using only the stack registers and stack manipulations?
Before After or or or...X A A A+B+C A
Y B B A A+B+C
Z C C B -
T - A+B+C - CL - - C B
I know an easy way with the HP42S:
ENTER
RCL - ST Z
RCL - ST T
or in an HP41:
ENTER
R^ (ROLL-UP)
ST+ Y
R^ (ROLL-UP)
ST+ Z
but I would like to know the shortest way to do it in, say, a Voyager, or in an HP32SII, or in an HP12C. Restrictions are the calculator's resources themselves. Any clues?
This is intented to activate some stand-by, RPN-mode, stack-simulation areas of contributors' brains. And, of course, I want to know a better, shortest way to do it.
Hope you like it.
Luiz C. Vieira - Brazil