Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site peora.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!pesnta!peora!jer From: jer@peora.UUCP (J. Eric Roskos) Newsgroups: net.math,net.lang.c,net.arch Subject: Re: Integer division Message-ID: <1952@peora.UUCP> Date: Mon, 3-Feb-86 08:39:12 EST Article-I.D.: peora.1952 Posted: Mon Feb 3 08:39:12 1986 Date-Received: Wed, 5-Feb-86 01:33:55 EST References: <11603@ucbvax.BERKELEY.EDU> <4917@alice.UUCP> Followup-To: net.arch Organization: Concurrent Computer Corporation, Orlando, Fl Lines: 40 Xref: watmath net.math:2780 net.lang.c:7756 net.arch:2462 > 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@peora.UUCP Home: jer@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