Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!mordor!lll-tis!ames!oliveb!sun!scherzo!lyang From: lyang%scherzo@Sun.COM (Larry Yang) Newsgroups: comp.arch Subject: Re: IEEE floating point modes Message-ID: <22630@sun.uucp> Date: Thu, 2-Jul-87 19:40:16 EDT Article-I.D.: sun.22630 Posted: Thu Jul 2 19:40:16 1987 Date-Received: Sat, 4-Jul-87 08:52:23 EDT References: <93900007@hcx1> Sender: news@sun.uucp Reply-To: lyang@sun.UUCP (Larry Yang) Organization: Sun Microsystems, Mountain View Lines: 26 In article <93900007@hcx1> daver@hcx1.SSD.HARRIS.COM writes: >IEEE floating point arithmetic users: > >Of the 4 rounding modes -- nearest, zero, positive infinity, and negative >infinity -- which one(s) are you most likely to use? I am not a real user of floating point arithmetic, but I understand a little bit about the theory behind the use of the rounding modes. The round to nearest is pretty straight-forward; it's the most obvious rounding mode. The rounding to +inf and -inf are especially useful in what is known as 'interval arithmetic'. Since floating point arithmetic has the potential of inaccuracies due to rounding, what a programmer may do is to perform a computation using 'round to +inf', then repeat the computation using 'round to -inf'. Then they are certain that the 'true' result lies somewhere between these two bounds; they know the 'interval' in which the solution lies. I am not sure about the use of round to zero; I will need to check my notes. ================================================================================ --Larry Yang [lyang@sun.com,{backbone}!sun!lyang]| A REAL _|> /\ | Sun Microsystems, Inc., Mountain View, CA | signature | | | /-\ |-\ /-\ Hobbes: "Why do we play war and not peace?" | <|_/ \_| \_/\| |_\_| Calvin: "Too few role models." | _/ _/