Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!aplcen!osiris!phil From: phil@osiris.UUCP (Philip Kos) Newsgroups: comp.arch Subject: Re: Multiply as Shift-Add(Subtract) Message-ID: <1096@osiris.UUCP> Date: Wed, 13-May-87 16:36:43 EDT Article-I.D.: osiris.1096 Posted: Wed May 13 16:36:43 1987 Date-Received: Sat, 16-May-87 06:45:38 EDT References: <1270@aw.sei.cmu.edu> <8012@utzoo.UUCP> <16640@amdcad.AMD.COM> <6651@mimsy.UUCP> Organization: Johns Hopkins Hospital Lines: 19 Summary: guard bits In article <6651@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > In article <27685@rochester.ARPA> crowl@rochester.ARPA (Lawrence Crowl) writes: > >... how do implementations using subtracts in the shift-add approach > >to multiplication detect overflow for an entire multiplication? > > I suspect, however, that the usual answer is `they do not bother'. Would you believe internal guard bits? Maybe not everyone does this, but it does give you the nice property that: given enough internal guard bits (you really only need a couple), any iterative operation like a multiple or divide (integer or floating point, it doesn't really matter) whose result is exactly representible in size of the target will be represented. Oh yeah, for the preceding property, it also helps a lot for the algorithm to be correct. :-) ...!decvax!decuac!\ Phil Kos ...!seismo!mimsy!aplcen!osiris!phil The Johns Hopkins Hospital ...!allegra!/ Baltimore, MD