Re: Rounding??
- From: "Andreas J. Guelzow" <aguelzow math concordia ab ca>
- To: gnumeric-list gnome org
- Subject: Re: Rounding??
- Date: Thu, 14 Jun 2001 09:34:56 -0600
Kjetil Torgrim Homme wrote:
> Yes, it's conventional, but it introduces a bias. Adding up the rounded
> numbers should ideally give the same result as rounding the sum of the
> full precision.
>
> 0.5 + 1.5 + 2.5 + 3.5 == 8
> 0 + 2 + 2 + 4 == 8
> 1 + 2 + 3 + 4 == 10
>
> The "round towards even" algorithm can perform as bad as "round up",
> but never worse, and usually much better.
That is incorrect:
round towards even:
0.4 + 2.5 == 2
round:
0.4 + 2.5 == 3
correct:
0.4 + 2.5 = 2.9
There is nothing better about `round towards even'. (Which of course is
a completely unsupported statement as the above.)
Andreas
--
Prof. Dr. Andreas J. Guelzow
Chair of Science
Concordia University College of Alberta
aguelzow math concordia ab ca
http://www.math.concordia.ab.ca/aguelzow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]