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...
 
This week, I saw a documentary done by the French called Les sacrifiés de l'IA, which was presented by a Canadian show Enquête. If you understand French I recommend it. Very eye-opening. I found a similar documentary in English called The Human Cost of AI: Data workers in the Global South. There is also an interview with Milagros Miceli (appearing in both documentaries) on Youtube: I also found a powerpoint presentation by the economist Uma Rani (appearing in the French documentary), AI...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
Back
Top