Certainly the first example is not exactly a bug since the answer is a
priori only determined modulo 15, so 11 is as good as -4.  It's only a
bug if the solution is supposed to be guaranteed minimal, which is
what the earlier business with extended gcd was all about.

John

On 08/01/2008, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Jan 8, 10:00 am, Francois <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> Hi Francois,
>
> > In my efforts to get sage in Gentoo I came on something that looks
> > like a problem in gmp 4.2.2.
> > On Gentoo gmp 4.2.2 is marked stable and is part of the system (needed
> > by gcc). On the ground
> > that the only patch relevant to me was the new fast gcd code and that
> > it was a performance patch
> > and not a correctness one, I decided to use my system gmp (along with
> > bzip2, readline, mpfr,gd,
> > pari [mistake since the Galois data are not included in Gentoo],
> > gnutls, atlas [oh yes not another
> > 5 hours of tunning, please] and maxima - I passed on python for now).
> >
> > Having a successful build after rather minimal adjustment I decided to
> > test it
> > (sage -testall) and compare the results with a regular build. Numerous
> > failures at
> > various point. First tut.tex:
> > sage -t  tut.tex
> > ***************************************************************
> > *******
> > File "tut.py", line 1126:
> >     : x = crt(2, 1, 3, 5); x
> > Expected:
> >     11
> > Got:
> >     -4
> > **********************************************************************
> > File "tut.py", line 2250:
> >     : M.T(11).charpoly('x').factor()
> > Expected:
> >     (x - 285311670612) * (x - 534612)^2
> > Got:
> >     x^3 - 732255212432452092*x^2 + 732255211931384496*x -
> > 3145012477679296873951599424
> > **********************************************************************
> > 2 items had failures:
> >    1 of   8 in __main__.example_48
> >    1 of   8 in __main__.example_96
> > ***Test Failed*** 2 failures.
> > For whitespace errors, see the file .doctest_tut.tex
> >          [60.2 s]
> > exit code: 256
> >
> > and then a few more. For the first failed test putting back gmp/mpfr
> > in the build
> > solved the problem for the second putting back pari worked [of course
> > system
> > pari was built against system gmp so it probably propagated from
> > there]. That
> > solved almost all the failed test I had (the test didn't finish got
> > stuck in calc.py
> > if memory serves me correctly).
>
> The system's Maxima ought to be at fault here.
>
> > I checked that gmp was built properly with the "make check" provided
> > in gmp,
> > so it doesn't look like a miscompilation.
>
> You may have hit http://trac.sagemath.org/sage_trac/ticket/1482 since
> the system gmp didn't have the improved gcd code patched in. The
> default behavior is not to pass the parameter "minimal", so the issues
> you see won't be fixed if you use a non-patched gmp. For many people
> patching the gmp with a GPLed patch making the derived work GPL only
> will be a problem since many distributions ship code that depends on
> GPL being LGPL.
>
> > I guess it should be investigated before this version of gmp makes it
> > into sage
>
> I am confident it will be resolved. The changes gmp 4.2.1->4.2.2 were
> largely config fixes and fixes for exotic platforms, so I don't expect
> any problems once we remerge our patch set.
>
> Thanks for the report.
>
> Cheers,
>
> Michael
> >
>


-- 
John Cremona

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to