calculator: some unary ops in programmer RPN mode broken

Originator:fwvdijk
Number:rdar://6912686 Date Originated:2019-08-03
Status:open Resolved:
Product:macOS Product Version:10.14.6
Classification: Reproducible:
 

Comments

still broken in Ventura

In the Calculator app, in RPN mode, in Programmer mode, the outcome of some, but not all, unary operations is 0 instead of the expected value when the operation is repeated.

steps to reproduce: - start Calculator - hit cmd-3 for programmer mode - hit cmd-r for RPN mode (if not enabled already) - enter "1" - hit "<<", the unary shift left operator - result is "2". Ok. - hit "<<" again. - result is "4". Ok. - hit "RoL", the unary rotate left operator - result is "0". Not ok. Expected "8". - enter "1" - hit "RoL" - result "2". Ok. - hit "RoL" - result "0". Not ok. Expected "4".

The "RoR", "2's complement", and "1's complement", "byte flip", and "word flip" unary operators are similarly broken.

The ">>" unary operator is ok, like "<<".

Also, perhaps related (also an unexpected "0" outcome): - enter "1" - hit "enter" - a "0" is pushed onto the stack, where in Basic and Scientific mode a duplicate of the top-of-stack is pushed ("1" in this case)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!