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)
Antonio 
Another interesting find! To mix American slang with French, "You da betatester par excellence!"
Yes, indeed, this looks like a bug. The HP33S manual states that IDIV is the Equationmode 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 HP16C performs differently than the MOD function on the HP41C*, HP42S, and HP28/48/49.
RMD is defined only for integer arguments. It always returns +/2 for the four cases you provided, consistent with its builtin integer arithmetic. E.g., 7 goes into 9 only 1 times, with a remainder of 2. 9 ENTER 7 / in DEC (base10 integer) mode yields 1 as the answer, with the carry bit set.
"Rmdr" on the HP33S 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.
 KS
