How to add a 'constant' using RPN? - Printable Version +- HP Forums ( https://archived.hpcalc.org/museumforum)+-- Forum: HP Museum Forums ( https://archived.hpcalc.org/museumforum/forum-1.html)+--- Forum: Old HP Forum Archives ( https://archived.hpcalc.org/museumforum/forum-2.html)+--- Thread: How to add a 'constant' using RPN? ( /thread-30021.html) |

How to add a 'constant' using RPN? - Joe - 03-17-2003
Question: how do you add a constant over and over again? I have an HP12c and I would like to take a starting value and keep adding 128 to it. I can do this by taking the original value 1240 + 128. One would do it like this:
1240 ENTER This gives me a total to which I want to add 128 to. What is the easiest way to do that? I can hit ENTER and 128 + once again, but is there a better way? On certain 'regular' calculators, one has to just hit the plus button and you get your answer. Is there something similar using RPN?
Thanks, Re: How to add a 'constant' using RPN? - Michael Meyer - 03-17-2003
It's easy! Simply type in "128", Enter, Enter, Enter. Then type in an X value, hit "+". You can keep adding 128 to the total by hitting "+". Or, to add another number to 128, hit "CLX"; type in the new X, then hit plus. Any value placed in the "t" register will be duplicated when the stack "drops". Easy!
Michael
Re: How to add a 'constant' using RPN? - db (martinez, ca.) - 03-17-2003
128 (# in your example), enter, enter, enter, whatever # you want to preform arithmatic on, + - X or /, note or store your answer, roll down, key in the next number you want to preform an operation on, then + - X or /, note or store the answer, roll down, repete till your tired of it. this works on any rpn with a replicating t register, not just hp.
Re: How to add a 'constant' using RPN? - Scuba Diver - 03-17-2003
Just a word of caution; This doesn't work on all HPs, only those with 4-level stacks. Filling the t-stack with your constant won't work on the 28 and 48, for instance, because neither calculator has a t-level Interestingly, it does work on the 17BII and 19BII, eventhough they don't actually have a standard 4-level stack...their stack expands to a maximum of 4 levels, depending on the number of items placed in it.
B.
Re: How to add a 'constant' using RPN? - Richard Garner - 03-17-2003
I am not familiar with the 12c, but if it is capable of it. Do a 128 STO 01, then every time you wanted to +, -, *, or / you could do a RCL+ 01, RCL- 01, RCL* 01 or RCL/ 01. This has the advantage of leaving the stack elements in place for other calculations.
Re: How to add a 'constant' using RPN? - Joe - 03-17-2003
Thank you all for the timely answers. I appreciate it.
joe
Re: How to add a 'constant' using RPN? - James M. Prange (Michigan) - 03-18-2003
I'd probably use the LASTX command. Press the prefix key g, then LST |