On Feb 15, 2010, at 3:09 PM, François Bissey wrote:

On Tue, 16 Feb 2010 10:40:11 William Stein wrote:
sage -t  "devel/sage/doc/en/tutorial/tour_numtheory.rst"
**********************************************************************
File "/opt/sage/devel/sage/doc/en/tutorial/tour_numtheory.rst", line 94:
  sage: x = crt(2, 1, 3, 5); x
Expected:
  -4
Got:
  11

The above two are because you are using GMP instead of MPIR.

So you are saying we need to link against the mpir version of the gmp
libraries and that linking against gmp ones produces this result.
I guess a finer point to know is. is this result correct but not reduce to
same domain? And does it have nasty consequences later - ie do
other thing rely on the result to be in this domain?

The results are just as correct, they're only defined mod N for some N (15 in the case above).

One more question, if we need to link against mpir's libgmp, does linking sage itself against it enough, or do we need to also link pari, mpfr, mpfi and other against it as well? mpfr in itself would be a problem as it is
part of the toolchain (gcc is compiled against it).

The issue here is that xgcd can return different (correct) answers. This is where (I hope) all the modular symbols bugs are coming in as well. One thing I've been meaning to do is provide a thin wrapper on top of the mpz_xgcd command which normalizes the result. I would expect that for most algorithms impacted this wouldn't greatly increase the overhead, and this would mean we could more easily swap GMP and MPIR for each other.

As for all the group errors, Dima Pasechnik did a lot of good work in this direction: http://trac.sagemath.org/sage_trac/ticket/8150

Another issue with the piecemeal approach is that upgrading a component could suddenly cause Sage to break. Have you given any thought to how you will handle this?

- Robert

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to