Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2005 09:58:01 +0200
From:      John Oxley <john@yoafrica.com>
To:        Nikolas Britton <nikolas.britton@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: Whats up with KCalc?
Message-ID:  <20050713075801.GC8552@yoafrica.com>
In-Reply-To: <ef10de9a05071223136515c381@mail.gmail.com>
References:  <ef10de9a05071203165b346ce1@mail.gmail.com> <200507120941.12027.ean@hedron.org> <42D3D25A.9040107@speechpro.com> <200507121110.01535.ean@hedron.org> <ef10de9a05071213443f407987@mail.gmail.com> <ef10de9a05071223136515c381@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--gDGSpKKIBgtShtf+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 13, 2005 at 01:13:24AM -0500, Nikolas Britton wrote:
> On 7/12/05, Nikolas Britton <nikolas.britton@gmail.com> wrote:
> Ok... this thing is WAY OFF... if you type in 85.49 and then hit the +
> key the thing automatically jumps to
> 85.48999999999999488409230252727866172791!!! My SuSE box shows "85.49"
> but if you copy and paste the number into a text editor it shows
> 85.48999... too.

IANA Mathematician, but my guess would be that there is a rounding
error.  KCalc as you have all said uses 96bit long double precision.
This means that floating point numbers are stored as 96bit doubles.
And yes 46 is a floating point (46.000).  My varsity days are a bit
hazy, but I believe a double is stored as X bits ^ Y bits.  Not sure of
the ratios of X and Y though.  This means you can only get a certain
accuracy.  If X is 8 for example, the accuracy is 1/(268435456) =3D~
3.725290e-09. =20

Therefore your smallest unit number is that and any other number will be
a multiple of that, raised to a power which is where the Y bits comes
in.  Oh I forgot to mention that X+Y =3D 96.

This is probably a very bad explanation and hopefully someone can do it
better :)

-John

--gDGSpKKIBgtShtf+
Content-Type: application/x-pkcs7-signature
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64

MIIIkgYJKoZIhvcNAQcCoIIIgzCCCH8CAQExCzAJBgUrDgMCGgUAMA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