Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site ism780c.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!lll-crg!ucdavis!ucbvax!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!ism780c!tim From: tim@ism780c.UUCP (Tim Smith) Newsgroups: net.arch Subject: Re: Right shift vs. divide (change divide!) Message-ID: <257@ism780c.UUCP> Date: Wed, 15-Jan-86 16:00:31 EST Article-I.D.: ism780c.257 Posted: Wed Jan 15 16:00:31 1986 Date-Received: Sat, 18-Jan-86 07:05:17 EST References: <124000005@ima.UUCP> <4772@alice.UUCP> <1016@turtlevax.UUCP> <32@calgary.UUCP> <345@mcgill-vision.UUCP> Reply-To: tim@ism780c.UUCP (Tim Smith) Organization: Interactive Systems Corp., Santa Monica, CA Lines: 26 In article <345@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes: > C (I can hear it now: "Doesn't >> mean `much greater than'?"). I thought it was an input operator.. :-) > Only reason I can see for a mathematician -- for anyone -- to want >it to work this way is that then x-(y*(x/y)) is always >=0. Actually, it is not that we want it to be >= 0, we want it to have only |y| different values, rather than 2|y|-1 values. In fact, if y < 0, then we want it to be <= 0. > I don't see why you aren't satisfied with -3/2=-1 and -3%2=-1. > You still have that x=(x%y)+(y*(x/y)), which is really all > mathematicians demand, as far as I know (flame retardant: my > knowledge of number theory is limited to undergrad level). I want (x+ny)/y to be the same as x/y + n. This only works if we always round toward negative infinity, or always round toward positive infinity. > What do you want done with -3/-2 or 3/-2? 1 and -2. -- Tim Smith sdcrdcf!ism780c!tim || ima!ism780!tim || ihnp4!cithep!tim