fast integer division

Bob Alverson sun!colossus.tera.com!bob
Mon Jun 25 10:39:24 PDT 1990


The paper Tim cited is "Integer Multiplication and Division on the HP
Precision Architecture" by Magenheimer et al, in ASPLOS II.

Comments:  The Tera computer is also going to have a 64*64->128 multiply
array.  Thus, I have been looking into similar methods.  Unfortunately,
FORTRAN division is sign-magnitude (-3 / 2 = -1 rem -1), so it is hard
to directly compute the quotient when using 2's complement arithmetic.
Unsigned arithmetic still comes up, but mostly in C, either explicitly
or in pointer subtraction.

If think you can eliminate the fixup step in most, if not all, cases by
careful selection of your reciprocal approximation, bias and shift amount.
If I can get it all figured out and proven by August, I'll be sending it
in to ASPLOS.

Bob (bobatera.com)



More information about the Numeric-interest mailing list