Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!news.hal.COM!decwrl!netcomsv!netcom.com!yost
From: Dave@Yost.COM (Dave Yost)
Subject: Re: Odd (actually even) ROUND behavior
Message-ID: <yostCy8s4q.J07@netcom.com>
Sender: yost@netcom.com (Dave Yost)
Reply-To: Dave@Yost.COM (Dave Yost)
Organization: Dave Yost's house
References: <yostCy5t3z.EvA@netcom.com> <RV.94Oct24042130@tahoe.cs.brown.edu>
Date: Tue, 25 Oct 1994 18:46:02 GMT
Lines: 28

In article <RV.94Oct24042130@tahoe.cs.brown.edu>,
rodrigo vanegas <rv@tahoe.cs.brown.edu> wrote:
>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?

away from 0

Maybe you went to school after the 60s.

-- 
  Dave Yost
      @    .COM
