|Re: Integer division on HP 33S|
Message #9 Posted by Karl Schneider on 3 Aug 2006, 12:11 a.m.,
in response to message #1 by Antonio Maschio (Italy)
Another interesting find! To mix American slang with French, "You da beta-tester par excellence!"
Yes, indeed, this looks like a bug. The HP-33S manual states that IDIV is the Equation-mode name of the "INT/" function on the keyboard, but the should perform the same way. The answers for IDIV when the two operands are of opposite sign are plainly incorrect, because they are not consistent with the result from "Rmdr".
Discussion of MOD/RMD took place here a year or two ago. It is noteworthy that the RMD function on the HP-16C performs differently than the MOD function on the HP-41C*, HP-42S, and HP-28/48/49.
RMD is defined only for integer arguments. It always returns +/-2 for the four cases you provided, consistent with its built-in integer arithmetic. E.g., -7 goes into 9 only -1 times, with a remainder of 2. 9 ENTER -7 / in DEC (base-10 integer) mode yields -1 as the answer, with the carry bit set.
"Rmdr" on the HP-33S acts like MOD, which returns +/-5 when the operands are of opposite sign. It seems as though the rule requires that the MOD remainder and the divisor be of the same sign.