Posts: 149
Threads: 22
Joined: Feb 2009
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
128 +
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,
joe
Posts: 472
Threads: 58
Joined: Apr 2008
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
Posts: 1,322
Threads: 115
Joined: Jul 2005
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.
Posts: 160
Threads: 28
Joined: Jan 1970
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.
Posts: 237
Threads: 20
Joined: Mar 2006
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.
Posts: 149
Threads: 22
Joined: Feb 2009
Thank you all for the timely answers. I appreciate it.
joe
Posts: 1,041
Threads: 15
Joined: Jan 2005
I'd probably use the LASTX command. Press the prefix key g, then LSTX (the ENTER key), and then +.