home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!sgigate!sgi!wdl1!wdl39!mab
- From: mab@wdl39.wdl.loral.com (Mark A Biggar)
- Newsgroups: sci.math
- Subject: Re: Rounding Rules
- Message-ID: <1992Dec21.234114.5766@wdl.loral.com>
- Date: 21 Dec 92 23:41:14 GMT
- References: <1992Dec20.003018.14325@sol.ctr.columbia.edu> <LOTTO.92Dec21062820@math.math.berkeley.edu>
- Sender: news@wdl.loral.com
- Organization: Loral Western Development Labs
- Lines: 21
-
- In article <LOTTO.92Dec21062820@math.math.berkeley.edu> lotto@math.berkeley.edu (Ben Lotto) writes:
- >>>>>> On Sun, 20 Dec 1992 00:30:18 GMT, shaw@toadflax.UCDavis.EDU (Rob Shaw) said:
- >Rob> What is the rationale behind the following rounding rule?
- >Rob> when dealing with 5's followed by all zero's, check the
- >Rob> next digit to the left. If it's even, round down; odd,
- >Rob> round up.
- >I was told way back in my undergraduate days that one should generally
- >"round to evens." Someone recently explained the rationale for this
- >as follows. Suppose we start with 1.49 and round in the traditional
- >manner twice. First we would round to 1.5 and then to 2. On the
- >other hand, if we round just once we get 1. Rounding to evens
- >prevents us from getting different answers.
-
- Round to even also has the nice property round(abs(x)) = abs(round(x)), which
- given that most floating point representations on computers use a
- signed-magnitude format means that the rounding hardware doesn't have to
- look at the sign bit to do the rounding.
-
- --
- Mark Biggar
- mab@wdl1.wdl.loral.com
-