[This page is auto-generated; please prefer to read the article’s PDF Form.]
We will multiply both a and b by a Scaling-Factor f so that (bf)’s first digit is at least (B − 1)∕2. Then, we will perform the division process on these modified operands af (dividend) and bf (divisor). The quotient of this division must be same as the quotient with original operands a and b. The remainder needs to be divided by f to give the remainder for division with original operands.
We can find the scaling-factor f as follows. Let us try with f as a single digit number. In the multiplication bs{s = f}, the value (uv) in the result will follow, due to (3) and (4):
|
We want this value (uv) to satisfy the constraints:
|
which can be achieved with:
So, we can choose f = ⌊B∕(e + 1)⌋.
Copyright © 2021 Nitin Verma. All rights reserved.