Calculators Why is My HP RPN Operation Displaying Unexpected Results?

  • Thread starter Thread starter cwalken
  • Start date Start date
  • Tags Tags
    Strange
AI Thread Summary
The discussion revolves around an unexpected behavior in the RPN (Reverse Polish Notation) operation of HP calculators. When a sequence of entries is performed—starting with the number 5, duplicating it in the stack, and then rotating the stack—the expected outcome after multiplying by 10 is that the stack would read (50, 5, 5, 0). However, the actual result is (50, 5, 5, 5), indicating that the T register retains its previous value instead of being zeroed out. This behavior is confirmed as correct, highlighting that the T register does not reset to zero after operations, which can lead to confusion for users expecting standard behavior. Further examples demonstrate that the calculator maintains values in the T register during operations, affecting subsequent calculations.
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...
 
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top