Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!princeton!allegra!alice!ark From: ark@alice.UUCP Newsgroups: comp.arch Subject: Re: IEEE floating point modes (interval arithmetic and division) Message-ID: <7055@alice.UUCP> Date: Sat, 4-Jul-87 11:00:06 EDT Article-I.D.: alice.7055 Posted: Sat Jul 4 11:00:06 1987 Date-Received: Sat, 4-Jul-87 20:25:29 EDT References: <93900007@hcx1> <22630@sun.uucp> <2774@phri.UUCP> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 18 In article <2774@phri.UUCP>, roy@phri.UUCP writes: > Maybe I'm just exposing my ignorance of the subject, but it seems > to me that for division, i.e. if you do (a+b)/(c+d), this logic doesn't > hold. If a+b = 1.1 and c+d = 1.9, for example, rounding both intermediate > results towards -inf gives 1.0/1.0 = 1.0; similarly, rounding both towards > +inf gives 2.0/2.0 = 1.0. The "real" answer is 0.578..., which is *not* > within the interval (1.0,1.0). First of all, the rounding we're talking about is not rounding to the nearest integer, but rounding to the nearest floating-point number. However, let's pretend we're rounding to the nearest integer. Then for division we have to round in the direction that gives the smallest and then the largest result: 1.0/2.0 = 0.5 2.0/1.0 = 2.0 so we find that the result is in the interval (0.5,2.0)