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

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

Re: operation of 'round' function


From: David Kastrup
Subject: Re: operation of 'round' function
Date: 07 Feb 2002 21:37:50 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

ronan.waide@euroconex.com (Ronan Waide) writes:

> On February 7, schwab@suse.de said:
> > 0.5 is exactly halfway between 0 and 1, so the additional rule is that in
> > case of a tie the even number is used.
> 
> Um.
> 
> That makes no sense whatsover.

It does not introduce a bias by rounding, which rounding up always
does.  It does round away from ambiguous values.  That way the
floating point equality
a+b-b = a+b-b+b-b
holds.  It wouldn't with rounding up.

It is the numerically preferred rounding method.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de



reply via email to

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