home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / 17678 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  1.2 KB

  1. Path: sparky!uunet!psinntp!kepler1!andrew
  2. From: andrew@rentec.com (Andrew Mullhaupt)
  3. Newsgroups: sci.math
  4. Subject: Re: Rounding Rules
  5. Message-ID: <1447@kepler1.rentec.com>
  6. Date: 5 Jan 93 04:55:12 GMT
  7. References: <1992Dec20.003018.14325@sol.ctr.columbia.edu> <1992Dec23.140148.21009@hubcap.clemson.edu> <1993Jan4.142226.9639@iscsvax.uni.edu>
  8. Organization: Renaissance Technologies Corp., Setauket, NY.
  9. Lines: 19
  10.  
  11. In article <1993Jan4.142226.9639@iscsvax.uni.edu> kraai4712@iscsvax.uni.edu writes:
  12. >My personal favorite rounding rule is to round anything that has {0,1,2,3,4} in
  13. >the "rounding place" "down" and anything that has {5,6,7,8,9} "up".  So as in
  14. >the previous example, 1.13500 would be rounded to 1.14 and 1.14500 would be
  15. >rounded to 1.15.
  16.  
  17. >To this my teachers always gasped that this method was biased, and no amount of
  18. >pursuasion using the above-mentioned sets could pursuade them.
  19.  
  20. Nor should it. As in all cases like this, Knuth's _Art of Computer Programming_
  21. is definitive. 
  22.  
  23.  
  24. It is somewhat more work to round to nearest even, but it is often preferred.
  25. Given that most computers can do floating point arithmetic in one cycle, the
  26. work of rounding is not onerous.
  27.  
  28. Later,
  29. Andrew Mullhaupt
  30.