Richard Levitte 6ab285bf4c I think I got it now. Apparently, the case of having to shift down
the divisor was a bit more complex than I first saw.  The lost bit
can't just be discarded, as there are cases where it is important.
For example, look at dividing 320000 with 80000 vs. 80001 (all
decimals), the difference is crucial.  The trick here is to check if
that lost bit was 1, and in that case, do the following:

1. subtract the quotient from the remainder
2. as long as the remainder is negative, add the divisor (the whole
   divisor, not the shofted down copy) to it, and decrease the
   quotient by one.

There's probably a nice mathematical proof for this already, but I
won't bother with that, unless someone requests it from me.
2002-12-02 21:31:45 +00:00
..
1999-04-29 16:04:54 +00:00
2000-12-07 22:06:09 +00:00
2001-03-08 15:56:15 +00:00
2000-12-07 22:06:09 +00:00
2002-11-27 13:40:41 +00:00
2000-11-30 00:18:19 +00:00
2002-06-13 20:42:35 +00:00
2002-10-28 14:02:19 +00:00
2001-09-04 11:02:23 +00:00
2000-02-16 13:24:06 +00:00
2000-02-16 13:24:06 +00:00
2002-08-02 15:13:10 +00:00
2002-11-14 11:22:01 +00:00