Integer division

J. Eric Roskos jer at peora.UUCP
Mon Feb 3 23:39:12 AEST 1986


> Pardon my flamage, but what sort of nonsense is this:
> [in reference to divide instructions that give -(a/b)=(-a)/b]
> >I have NEVER seen an instance where the first one is preferable.  Not
> Wrong!  That's the definition.  It can't be incorrect.  It might be
> different from what a number theorist wants, but by no stretch of the
> imagination can it be called incorrect.  A mathematician should be able to
> to handle this elementary concept.

But it may not be too usable to mathematicians if your definition is
different from the generally accepted one... after all, mathematicians are
one of the main groups of people these machines are built for...

Anyway, I thought he was talking about "%", not "/"...  I would think that
since

	3 * -2 = -6
then
	-6 / 3 = -2
and
	-6 / -2 = 3

Could someone who is a genuine number theorist please post the way the
"modulo" function is supposed to work, and also what number theorists
would prefer the results of integer divisions with nonzero remainders to
be (for various permutations of signs), so that people who have some say
in the way instruction sets get designed can make sure it's done right in
the future?  Please put "I am a number theorist" at the start of your
posting (include some proofs too if you want!) ... this discussion has
been going around and around for weeks.

Better yet, put "Number theory" in the "subject" line ...

Be sure to post it to net.arch, not just net.math.
-- 
UUCP: Ofc:  jer at peora.UUCP  Home: jer at jerpc.CCUR.UUCP  CCUR DNS: peora, pesnta
  US Mail:  MS 795; CONCURRENT Computer Corp. SDC; (A Perkin-Elmer Company)
	    2486 Sand Lake Road, Orlando, FL 32809-7642     xxxxx4xxx

	"There are other places that are also the world's end ...
	 But this is the nearest ... here and in England." -TSE



More information about the Comp.lang.c mailing list