bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: operation of 'round' function. Why does it matter?


From: Alan Mackenzie
Subject: Re: operation of 'round' function. Why does it matter?
Date: 9 Feb 2002 13:24:14 +0100
Date: Sat, 9 Feb 2002 08:10:44 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Deepak Goel <address@hidden> wrote on 08 Feb 2002 11:28:38 -0500:
>> 
>> So, if it is 2.5, you round to 2, but, if it is 3.5, you round to 4??


> well, yes.  that's the convention i have seen more than any other.
> if you have a large data of numbers to be rounded, this method ensures
> that you do not change the mean..

Of course you change the mean.  What you mean, I think, is that the mean
of the change of the mean is zero.

Why on earth does it matter?  Any time you're doing rounding, truncating,
flooring, or whatever, you're fudging the result and loosing accuracy.

In the few cases in which it does matter, the programmer should know what
she is doing.

> Deepak

-- 
Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").




reply via email to

[Prev in Thread] Current Thread [Next in Thread]