Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site abic.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!cwruecmp!abic!jst From: jst@abic.UUCP (Shack Toms) Newsgroups: net.lang.c,net.arch Subject: Re: Integer division Message-ID: <731@abic.UUCP> Date: Wed, 5-Feb-86 20:19:40 EST Article-I.D.: abic.731 Posted: Wed Feb 5 20:19:40 1986 Date-Received: Fri, 7-Feb-86 21:46:10 EST References: <11603@ucbvax.BERKELEY.EDU> <4917@alice.UUCP> <11671@ucbvax.BERKELEY.EDU> Organization: Allen-Bradley Co., Highland Heights, OH 44143 Lines: 47 Xref: watmath net.lang.c:7785 net.arch:2476 > By the way, Tom Duff, have YOU ever seen an example where a%b<0 is preferred? I am squarely in the 0<=a%b0) m -= b; is always incurred in portable code. (Unless your compiler is more intelligent than any of the "C" compilers I have ever used.) On the other hand: the lack of the property -a/b == -(a/b) Is easily accounted for portably (simply write the expression you mean rather than the other one. :-)) Disclaimer: blah blah blah.... Shack Toms