Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sbcs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!hao!seismo!cmcl2!philabs!sbcs!debray From: debray@sbcs.UUCP (Saumya Debray) Newsgroups: net.lang Subject: Division by multiplication Message-ID: <658@sbcs.UUCP> Date: Mon, 16-Jul-84 09:38:55 EDT Article-I.D.: sbcs.658 Posted: Mon Jul 16 09:38:55 1984 Date-Received: Fri, 20-Jul-84 03:23:57 EDT References: <593@opus.UUCP> Organization: SUNY at Stony Brook Lines: 27 > Perhaps you haven't seen some of the bizarre phenomena that have > come from Mr. Cray. The Cray I has no divide instruction; instead > it has a reciprocal approximation (emphasis on "approximation"). Perhaps you're referring to the "division by multiplication" algorithm (I'm not familiar with the architecture of the Cray I, so correct me if I'm wrong, but that's what it sounds like). This is useful if there's a fast hardware multiplier, since it obviates the need for a separate hardware divider. The idea is that since X X * F0 * F1 * ... Q = - = ----------------- , Y Y * F0 * F1 * ... if we can find F0, F1, ... such that (Y * F0 * F1 * ...) approaches 1, then (X * F0 * F1 * ...) approaches Q. Incidentally, this division algorithm is also used by the CDC 6600 and 7600. -- Saumya Debray, SUNY at Stony Brook uucp: {cbosgd, decvax, ihnp4, mcvax, cmcl2}!philabs \ {amd70, akgua, decwrl, utzoo}!allegra > !sbcs!debray {teklabs, hp-pcd, metheus}!ogcvax / CSNet: debray%suny-sbcs@CSNet-Relay