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

List:       kde-devel
Subject:    Re: [despammed] Re: Open Bugs in 3.2
From:       Esben Mose Hansen <esben () mosehansen ! dk>
Date:       2004-01-13 17:18:44
Message-ID: 200401131818.47410.esben () mosehansen ! dk
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 12 January 2004 18:58, Dominic Chambers wrote:
> > Why not simply limit KCalc to e.g. 13 significant digits? That's what
> > calculators used to do, and it works fine 99.999% of the time ;-)
>
> 99.999% eh! Proove it! ;-)

;-)

> Although I can set KCalc to show 16 significant digits, it was defaulted to
> 14, which seems to be pretty much the recommendation you are making. Out of
> interest, can you show me how to make KCalc mess up with 13-15 digits? I
> can't manage it.

Well, yes.  Do this (in the calculator):

x = 1.0;
while (true) {
   x / 3.0;
   x * 3.0;
   print (abs(1.0-x));
}

At some point you'll see the error.... unless KCalc rounds between 
calculation, in which case you'll just have to insert an additional print 
between the two calculations above :) Oh, and arbitrary precision won't help 
you, only prolong your misery ;-) 

3 digits in reserve is a good number, or at least one chosen by many 
calculators in the eighties. Sorry for not caring to do the math to get this 
number right. It should probably be 14 digits.

- -- 
regards, Esben

Homepage: http://www.mosehansen.dk
Signature fingerprint at http://www.mosehansen.dk/about
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFABCh3rfnftt13wXIRAoahAJ9o7JoMGGTQo+0PNTv9ajzjpYodlACdFzMS
73ipx5X6viC7PcakGKTMHKc=
=IBNO
-----END PGP SIGNATURE-----

 
>> 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