Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.arch Subject: Re: Right shift vs. divide Message-ID: <4797@alice.UUCP> Date: Sun, 12-Jan-86 01:24:51 EST Article-I.D.: alice.4797 Posted: Sun Jan 12 01:24:51 1986 Date-Received: Sun, 12-Jan-86 12:59:43 EST References: <996@mmintl.UUCP> Organization: Bell Labs, Murray Hill Lines: 9 > Also, (3) sometimes you know that the dividend is divisible by the power > of two you are dividing it by. And (4), a conditional add followed by a > shift is equivalent to a divide, and is often much faster. Finally, (5), > if you regard the number as a fraction, with the decimal point at the left, > what happens to the low order bit is of no great consequence. To which I add (6): sometimes you don't care if a division rounds up or down, as long as it delivers one of the neighbors of the exact result. Consider a binary search.