Re: modulus and remainder (Peter L. Montgomery)
1 Jul 2001 23:49:49 -0400

          From comp.compilers

Related articles
modulus and remainder (Matthew J. Lockner) (2001-06-28)
Re: modulus and remainder (2001-07-01)
Re: modulus and remainder (Joachim Durchholz) (2001-07-01)
| List of all articles for this month |

From: (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" <> 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 (US paper size) or (European A4 paper).
I supplied most of the mathematical theory, while
Granlund did the GCC implementation. Both of us tested the code.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.