Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!europa.eng.gtefsd.com!howland.reston.ans.net!swrinde!sgiblab!brunix!cs!rv
From: rv@tahoe.cs.brown.edu (rodrigo vanegas)
Subject: Re: Odd (actually even) ROUND behavior
In-Reply-To: Dave@Yost.COM's message of Mon, 24 Oct 1994 04:14:23 GMT
Message-ID: <RV.94Oct24042130@tahoe.cs.brown.edu>
Sender: news@cs.brown.edu
Organization: Brown University Department of Computer Science
References: <yostCy5t3z.EvA@netcom.com>
Date: Mon, 24 Oct 1994 08:21:30 GMT
Lines: 22

In article <yostCy5t3z.EvA@netcom.com> Dave@Yost.COM (Dave Yost) writes:

   Could someone explain why lisp rounds the way it does?

       "if number is exactly halfway between two integers
       (that is, of the form integer + 0.5) then it is
       rounded toward the one that is even (divisible by 2)."
				      - Steele (CLtL2)

   I've never heard of this practice, before or since computers.

Really?  This is how i was taught to round numbers in grade school.

   I suppose it is useful for something, but why isn't the usual
   type of rounding also available in the language?

So how do you do it?  On integer + 0.5 cases, do you round up, down,
away from zero, or what?

-- 
rodrigo vanegas
rv@cs.brown.edu
