DIV and MOD ( was: Something IBM did right )

Richard A. O'Keefe ok at quintus.uucp
Tue Nov 8 12:24:50 AEST 1988


In article <972 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
This is an issue which has been thrashed out many times over the years.
Back issues of SigPlan Notices are a good place to look.

As Every Schoolboy Knows, there are at least three sensible definitions of
integer division/remainder, all of which agree which divisor and dividend
are positive.  Common Lisp provides all three, and a fourth, also sensible.

Note that the Pascal standard does not define integer division and
remainder for non-positive divisors.



More information about the Comp.lang.c mailing list