Related articles |
---|
modulus and remainder lockner@chaos.cns.uni.edu (Matthew J. Lockner) (2001-06-28) |
Re: modulus and remainder Peter-Lawrence.Montgomery@cwi.nl (2001-07-01) |
Re: modulus and remainder joachim_d@gmx.de (Joachim Durchholz) (2001-07-01) |
From: | Peter-Lawrence.Montgomery@cwi.nl (Peter L. Montgomery) |
Newsgroups: | comp.compilers |
Date: | 1 Jul 2001 23:49:49 -0400 |
Organization: | CWI, Amsterdam |
References: | 01-06-078 |
Keywords: | arithmetic |
Posted-Date: | 01 Jul 2001 23:49:48 EDT |
"Matthew J. Lockner" <lockner@chaos.cns.uni.edu> writes:
>Does anyone know of a thorough reference on compiling modulus and remainder
>operators in expressions?
Translating between MOD (remainder same sign as dividend)
and REM (remainder same sign as divisor) is one topic in
"Division by Invariant Integers using Multiplication"
by Torbj\"orn Granlund and me.
It appeared in Proceedings of Programming Languages
Design and Implementation (PLDI), Orlando, FL, June, 1994
(June, 1994 issue of SIGPLAN Notices). You can retrieve it at
ftp.cwi.nl:/pub/pmontgom/divcnst.psl.gz (US paper size) or
ftp.cwi.nl:/pub/pmontgom/divcnst.psa4.gz (European A4 paper).
I supplied most of the mathematical theory, while
Granlund did the GCC implementation. Both of us tested the code.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.