[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: Bug#263991: axiom: wrong calculation ofsqrt(2.
From: |
Camm Maguire |
Subject: |
Re: [Axiom-developer] Re: Bug#263991: axiom: wrong calculation ofsqrt(2.) |
Date: |
07 Aug 2004 23:16:52 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings! This is GCL's fault. A workaround at present is:
)lisp (set-gmp-allocate-relocatable nil)
If you wish to make this permanent follow with
)lisp (si::save-system "/tmp/axiom")
mv /tmp/axiom /usr/lib/axiom-0.20040705/bin/AXIOMsys
I will track this down and fix this in the next GCL release. It
would be helpful if someone who builds axiom with GCL's local copy of
the gmp source statically linked in (i.e. ldd on AXIOMsys does not
show a gmp link) could report whether the issue persists.
For those who want to know, we have to patch gmp in one place to allow
bignums to be relocatable, which is a tremendous speed advantage. By
default on Debian, we dynamically link against external gmp, and it
appears that the latest version has an additional place where a patch
is now needed.
Take care,
William Sit <address@hidden> writes:
> > Heiko Scheit <address@hidden> writes:
> > [snipped]
> > echo "digits(DIGITS); sqrt(2.)" | axiom
> > One can see that for
> > > DIGITS=121278-121280 the result is not correct. For 121290 digits the
> > > result is OK again. As reference the output of Mathematica is given
> > > in the last row.
> > >
> > > DIGITS | result
> > > --------------------------------
> > > 121275 | 8347436383 149
> > > 121276 | 8347436383 14897
> > > 121277 | 8347436383 148974
> > > 121278 | 8347436382 1263421
> > > 121279 | 8347436382 9853356
> > > 121280 | 8347436383 114184622
> > > 121290 | 8347436383 1489743406 4670264
> > > --- | 8347436383 1489743406 467026400 (Mathematica output)
> > [snipped]
>
> I verified that NAG 2.3 version gives correct result for 121278-121280 (RedHat
> 9.0, i386 Pentium II (MMX) simulated on a Mac OS 10.2.8 using Virtual PC
> 6.01).
>
> 121278 8347436383 1489743
> 121279 8347436383 14897434
> 121280 8347436383 148974341
>
> William
>
> --
> William Sit
> Department of Mathematics..............Email: address@hidden
> City College of New York..........................Tel: 212-650-5179
> Convent Ave at West 138th Street..................Fax: 212-862-0004
> New York, NY 10031............Axiom, A Scientific Computation Sytem
> USA..........................http://www.nongnu.org/axiom/index.html
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah