[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] differences

From: Waldek Hebisch
Subject: Re: [Axiom-developer] differences
Date: Mon, 2 Apr 2007 15:39:53 +0200 (CEST)

> Ok, the problem isn't in axiom and it appears that it isn't in GCL.
> I built the same GCL sources (no axiom) on redhat 9 and fedora 5.
> The result of
> (cos (acos 0.7)) on Redhat is 0.69999999999....96
> (cos (acos 0.7)) on Fedora is 0.70000000000...07
> so the problem change is likely somewhere in a system library
> that gets linked into GCL. Since every other combination of
> sins, cos, logs, exps, etc ends up with 0.69999.... I have
> to conclude that there is a very minor bug in the Fedora lib.

I see the first result on 32-bit machines and the second one
on 64-bit ones.  AFAICS the difference is in least significant bit.
Since Lisp does not specify accuracy it is hard to call such difference
a bug.  To repeatable results one have to sacrifce some speed.
The are long flame wars related to this, see for example:

My presonal attitude is: do not trust in least significant digit
(it may differ due to different rounding).

                              Waldek Hebisch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]