|Re: HP 12C Platinum CHS bug?|
Message #12 Posted by M. Joury on 12 Aug 2011, 11:13 a.m.,
in response to message #11 by Ken Shaw
Unless I am misunderstanding what you are saying, I don't think that is right.
'Z' never gets involved. Assuming a clear stack to begin with (all zeroes) on the 15C:
10 CHS ENTER --> Y: -10; X: -10
10 ENTER CHS --> Y: 10; X: -10
Nothing ends up in 'Z'.
You get the EXACT same results on the 12CP, *BUT* on that machine CHS after ENTER appears to DISABLE stack lift (see my additional comments at the end). So any digits entered after that overwrite the -10 in the X register.
Per Tommy (from the HP-15C manual:
"After digit entry termination, CHS and EEX are lift-enabeling". The ENTER terminates the first number
This is identical to the operation of *MOST* hp calculators that I have tested including the original HP-12C and the HP-12C+.
I agree with Michael that this entry method is suspect and probably not the best way to do things but most other HP's handle it as I would expect. Also, see Gerson's reply in this same thread for an example where the behavior of the 12CP might get you in trouble.
One final point (made earlier) is that the result is not consistent. CHS after ENTER behaves differently than, say, after '+'. Try:
5 ENTER 5 + CHS 2 +
This gives you a result of -8 on every machine I have tested *OTHER THAN* the HP-35 which gives you 8. In the above example the CHS operation either enables stack lift or is neutral ('+' enabled it), either way the result is different.
I just realized that I think I know what is going on:
On most HP's CHS is neutral *EXCEPT* after digit entry (as suggested by the HP-15C manual). On the HP-12CP it is *ALWAYS* neutral and since ENTER disables stack lift CHS (neutral) leaves stack lift disabled and the next digit overwrites 'X'. That also explains the behavior with 5 ENTER 5 + where '+' enables stack lift and CHS (neutral) does not effect it so -10 is 'lifted' into 'Y when the next digit is entered. I will have to play around with this some and see if my assumption is consistent.