#19706: Upgrade GMP
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.11
      Component:  packages:          |   Resolution:
  optional                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Jeroen Demeyer     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  94ac0168fcb2c77883bd37b121f047ccd94d9e1a
  u/jdemeyer/upgrade_gmp             |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by fbissey):

 My discussion with Paul is in French, roughly translated it goes:
 "It is linked to a change of behavior of the mpz_invert between `5.1.3`
 and `6.0.0` when the modulo (last argument) is 1
 {{{
 zimmerma@coing:/tmp$ cat e.c
 #include <stdio.h>
 #include "gmp.h"

 main()
 {
  mpz_t a, b;
  int ret;
  printf ("GMP %s\n", gmp_version);
  mpz_init_set_ui (a, 1);
  mpz_init_set_ui (b, 1);
  ret = mpz_invert (a, a, b);
  gmp_printf ("ret=%d a=%Zd\n", ret, a);
 }

 zimmerma@coing:/tmp$ gcc e.c /usr/local/gmp-5.1.3/lib/libgmp.a
 zimmerma@coing:/tmp$ ./a.out
 GMP 5.1.3
 ret=0 a=1

 zimmerma@coing:/tmp$ gcc e.c /usr/local/gmp-6.0.0/lib/libgmp.a
 zimmerma@coing:/tmp$ ./a.out
 GMP 6.0.0
 ret=1 a=0
 }}}
 `GMP 6.0.0`'s behavior feels more logical to me
 "

--
Ticket URL: <http://trac.sagemath.org/ticket/19706#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to