HP Forums

Full Version: Var arithmetic on RPL machine?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi everybody,

Is there a way to do what would be the equivalent of register arithmetic on an RPN machine on a 48gx/50g ? I.e., on a 15c I would go 5 sto + 1 to add 5 to the contents of register 1. How would I do the same to the contents of a variable with a 48gx/50g? I know I could recall the variable to the stack, do the operation, then overwrite back into the variable, but is there not a tidier way? Can't seem to find such in the 48g owners manual.
Thanks and best regards, Hal

Quote:
Is there a way to do what would be the equivalent of register arithmetic on an RPN machine on a 48gx/50g ?

The 48SX has STO{+,-,*,/} and so do the later models, I suppose. They're used like STO, e.g.,

5 'X' STO+

although

'X' 5 STO+

also works; if both arguments are variable names, the one in level 1 is taken as the target.

i.

There is a full suite of storage arithmetic operations. You can find them in PRG MEM ARITH menu path on the 50G or MEMORY ARITH menu path on the 48GX.