|wp34s / 16C Compatibility Items #2 and #3|
Message #1 Posted by Jake Schwartz on 9 May 2011, 1:12 p.m.
As I have been continuing through the HP16C manual, exercising the examples with the wp34s (currently with version 843), two additional items were encountered:
1. Pages 40-41 discuss the Out-of-Range flag with respect to the arithmetic operations, and it mentions that "when a result is out-of-range, the lower bits ...of the full answer will be returned. If the operations was multiply or divide in 1's or 2's Compliment mode, the most significant bit (sign bit) returned will match the sign bit of the full answer." At the top of page 41 is an example where with 2's compliment mode and word size 16, the decimal number 32767 is entered, followed by  [multiply] and the result on the 16C is decimal 32766 with the out-of-range flag set. On the wp34s, the result displayed is "-2" decimal. This would represent the entire lower 16 bits of the result (65534), had the word size been large enough to hold the entire result. It would seem important to me to preserve the sign of the result, like in the 16C.
2. In this same section, there is discussion of the absolute value function (ABS). It appears, however, that ABS does not apply to integers in the 34s, both from trying it out and from reading the manual's Index of Operations. Would it be possible to extend ABS to be relevant to integers as well?