[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Open Bugs in 3.2
From:       Luciano Montanaro <mikelima () virgilio ! it>
Date:       2004-01-11 12:12:41
Message-ID: 200401111312.41610.mikelima () virgilio ! it
[Download RAW message or body]

On Sunday 11 January 2004 12:59, Graeme Ambler wrote:
> On Sunday 11 January 2004 11:27, Luciano Montanaro wrote:
> > On Sunday 11 January 2004 10:48, Andreas Hartmann wrote:
> > > Chris Howells wrote:
> > > > On Sunday 11 January 2004 09:05, Andreas Hartmann wrote:
> > > >>>71979. Do you want to ship a KDE, which incorporates a calculator
> > > >>> (kcalc), which calculates wrong? I think, this is a fatal bug.
> > > >>>
> > > >>>
> > > >>>49.84 + 33.52 = 83.36000000000001
> > > >
> > > > Can't reproduce on FreeBSD.  Broken libc?
> > >
> > > glibc 2.3.2 - kcalc in KDE 3.1.x works fine (with same glibc).
> >
> > It seems to be "fixed". The maximum number of significant digits is
> > limited to 10 in the configuration panel, and I think it defaults to two
> > - not that the original result is too wrong, it differs from the correct
> > solution by 1^-14.
>
> It doesn't even seem like a "bug" to me, simply a case of "ask a stupid
> question (what is 49.84+33.52 to 16 significant figures?), get a stupid
> answer (83.36000000000001)".  This is simply a feature of the limited
> precision of the floating point representation of the number.  Anyone who
> wants accuracy to 16 significant figures shouldn't be using a simple
> calculator program, and if they are they shouldn't expect to get reliable
> answers!

Sure. In fact, it is not a bug at all for me, knowing how math works on 
computers. But as there are bug reports about that, and not being able to fix 
the users, something has to be done :).
In fact, if I remember my math (or physics) classes, the result of an 
operation cannot be more precise than its operands. So, in the above example,
anything beyond the second decimal place is meaningless. Perhaps the results 
should be treated accordingly, however I have no real world calculator that 
works that way. In fact, I think the same behaviour can be triggered on desk 
calculators too. 

Luciano



>
> Graeme.
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

-- 
Luciano Montanaro //
                \X/ mikelima@virgilio.it
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic