[TAG] article "A Question Of Rounding" in issue #143 (Was: [Bug libc/4943] Inconsistent rounding behaviour for sprintf and IEEE doubles)

Kapil Hari Paranjape kapil at imsc.res.in
Fri Oct 5 05:50:31 MSD 2007


Hello,

On Thu, 04 Oct 2007, Kapil Hari Paranjape wrote:
> Such a bug could also be a feature in the eyes of some beholders.

This was meant in a lighter vein but could have a grain of truth in
this context.

In order that "value with an error bar" can be interpreted as
(Gaussian) *symmetric* bell shaped curve with the value as mean and
the error bar as variance one needs to ensure that rounding rules are
devoid of bias.

It is perfectly possible (though I have not checked this) that
rounding binary floating point numbers using the "common rules of
decimal arithmetic" could introduce a bias. This may be why the
IEEE standard was defined the way it was. (Image a Monte-Carlo
simulation which was free of bias ... until the results were
printed!).

I learnt the perils of "floating point" from D. Knuth's book(s) on
Algorithms. His approach to vector graphics avoids them altogether.
Hey! We have come a long way since then --- at least we don't call
them "real" numbers anymore (except in Fortran).

Now when will computer programmers stop calling numbers between 0 and
2^64-1 "integers"? People stuck with older hardware even do this for
numbers between 0 and 2^32-1 ;-)

Regards,

Kapil.
--





More information about the TAG mailing list