Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site kuling.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!enea!kuling!thomas From: thomas@kuling.UUCP (Thomas H{meenaho) Newsgroups: net.lang.c Subject: Re: Two Birds with One Stone Message-ID: <864@kuling.UUCP> Date: Fri, 20-Dec-85 21:34:44 EST Article-I.D.: kuling.864 Posted: Fri Dec 20 21:34:44 1985 Date-Received: Mon, 23-Dec-85 04:37:00 EST References: <874@dataioDataio.UUCP> Reply-To: thomas@kuling.UUCP (Thomas H{meenaho) Organization: The Royal Inst. of Techn., Stockholm Lines: 12 In article <874@dataioDataio.UUCP> bright@dataio.UUCP (Walter Bright writes: >Almost but not quite true. A compiler CANNOT normally replace a divide >by a right-shift if it is an integer divide. This is because a right >shift of a negative integer is not the same as a divide. However most useable processors provide arithmetic shifts which will give the right result even if it is a signed divide. -- Thomas Hameenaho, Dept. of Computer Science, Uppsala University, Sweden Phone: +46 18 138650 UUCP: thomas@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!thomas)