Why is My HP RPN Operation Displaying Unexpected Results?

  • Context: Calculators 
  • Thread starter Thread starter cwalken
  • Start date Start date
  • Tags Tags
    Strange
Click For Summary
SUMMARY

The discussion centers on the unexpected behavior of the HP RPN calculator during a specific sequence of operations. When the user enters the sequence of pressing 5, followed by two 'Enter' presses, and then rotates the stack with 'RDn', the expected stack configuration of (50, 5, 5, 0) does not occur. Instead, the stack displays (50, 5, 5, 5), indicating that the T register retains its previous value rather than being zeroed. This behavior is confirmed as correct, highlighting the importance of understanding stack operations in HP RPN calculators.

PREREQUISITES
  • Understanding of Reverse Polish Notation (RPN) operations
  • Familiarity with HP calculator stack mechanics
  • Knowledge of stack rotation commands, specifically 'RDn'
  • Basic proficiency in using HP calculator functions
NEXT STEPS
  • Research the behavior of the T register in HP RPN calculators
  • Learn about advanced stack manipulation techniques in HP RPN
  • Explore troubleshooting common RPN operation issues
  • Study the differences between various HP calculator models and their RPN implementations
USEFUL FOR

This discussion is beneficial for HP calculator users, RPN enthusiasts, and anyone seeking to deepen their understanding of stack operations and behaviors in HP RPN calculators.

cwalken
Messages
1
Reaction score
0
HP strange RPN operation?

I just find an odd behavior on my hp rpn operation. Can someone try the following sequence of entry and explain to me this strange behavior?

Press 5 (any number will do).
Press 'Enter' (this should duplicate 5 to x an y stacks)
Press 'Enter' again (duplicate 5 again so now x,y and z stack are all 5)
Press 'RDn' to rotate stack 4 times (this should bring the stack configuration back to the same, x,y and z stack are all 5. The stack should read (5,5,5,0) for (x,y,z,t).
Now press 10 and then *.

Normally, I would expect the stack to be (50, 5, 5, 0) for (X, Y, Z, T). But if you follow the above step, you will get (50, 5, 5 ,5). Am I missing something here?
 
Computer science news on Phys.org


That is the correct behavior. The T register is not zeroed, but remains the same. If you press 2 / enter / enter / enter, then press + many times, you will get 2, 4, 6, 8, 10, 12, 14, 16...
 

Similar threads

  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
7K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K