[Gmp-commit] /var/hg/gmp: 5 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Fri Dec 20 20:55:14 UTC 2019


details:   /var/hg/gmp/rev/466af0bf61f5
changeset: 17995:466af0bf61f5
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Dec 19 18:25:17 2019 +0100
description:
gmp-impl.h: Correct number of parameters for _nc macros.

details:   /var/hg/gmp/rev/2ef16eddb5f7
changeset: 17996:2ef16eddb5f7
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Dec 20 21:33:03 2019 +0100
description:
mpz/lucmod.c: typo in a comment

details:   /var/hg/gmp/rev/ff896f7a1edd
changeset: 17997:ff896f7a1edd
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Dec 20 21:42:17 2019 +0100
description:
tune/speed.c (routine): Add mpn_hgcd2_[45].

details:   /var/hg/gmp/rev/4b01a4df5317
changeset: 17998:4b01a4df5317
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Dec 20 21:43:14 2019 +0100
description:
Copyright years

details:   /var/hg/gmp/rev/12726da168ff
changeset: 17999:12726da168ff
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Dec 20 21:55:06 2019 +0100
description:
tests/mpf/t-conv.c: Test also the base=0 case.

diffstat:

 gmp-impl.h            |  12 ++++++------
 mpn/generic/fib2_ui.c |   2 +-
 mpz/lucmod.c          |   2 +-
 mpz/lucnum2_ui.c      |   3 ++-
 mpz/lucnum_ui.c       |   2 +-
 mpz/random2.c         |   3 ++-
 mpz/set_f.c           |   2 +-
 tests/mpf/t-conv.c    |   5 +++--
 tune/speed.c          |   2 ++
 9 files changed, 19 insertions(+), 14 deletions(-)

diffs (161 lines):

diff -r ab0543fdce2a -r 12726da168ff gmp-impl.h
--- a/gmp-impl.h	Mon Dec 09 10:22:42 2019 +0100
+++ b/gmp-impl.h	Fri Dec 20 21:55:06 2019 +0100
@@ -850,7 +850,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_addlsh_nc && ! HAVE_NATIVE_mpn_addlsh1_nc
-#define mpn_addlsh1_nc(a,b,c,d)         mpn_addlsh_nc(a,b,c,d,1)
+#define mpn_addlsh1_nc(a,b,c,d,x)       mpn_addlsh_nc(a,b,c,d,1,x)
 #define HAVE_NATIVE_mpn_addlsh1_nc      2
 #endif
 
@@ -870,7 +870,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_addlsh_nc && ! HAVE_NATIVE_mpn_addlsh2_nc
-#define mpn_addlsh2_nc(a,b,c,d)         mpn_addlsh_nc(a,b,c,d,2)
+#define mpn_addlsh2_nc(a,b,c,d,x)       mpn_addlsh_nc(a,b,c,d,2,x)
 #define HAVE_NATIVE_mpn_addlsh2_nc      2
 #endif
 
@@ -890,7 +890,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_sublsh_nc && ! HAVE_NATIVE_mpn_sublsh1_nc
-#define mpn_sublsh1_nc(a,b,c,d)         mpn_sublsh_nc(a,b,c,d,1)
+#define mpn_sublsh1_nc(a,b,c,d,x)       mpn_sublsh_nc(a,b,c,d,1,x)
 #define HAVE_NATIVE_mpn_sublsh1_nc      2
 #endif
 
@@ -910,7 +910,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_sublsh_nc && ! HAVE_NATIVE_mpn_sublsh2_nc
-#define mpn_sublsh2_nc(a,b,c,d)         mpn_sublsh_nc(a,b,c,d,2)
+#define mpn_sublsh2_nc(a,b,c,d,x)       mpn_sublsh_nc(a,b,c,d,2,x)
 #define HAVE_NATIVE_mpn_sublsh2_nc      2
 #endif
 
@@ -930,7 +930,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_rsblsh_nc && ! HAVE_NATIVE_mpn_rsblsh1_nc
-#define mpn_rsblsh1_nc(a,b,c,d)         mpn_rsblsh_nc(a,b,c,d,1)
+#define mpn_rsblsh1_nc(a,b,c,d,x)       mpn_rsblsh_nc(a,b,c,d,1,x)
 #define HAVE_NATIVE_mpn_rsblsh1_nc      2
 #endif
 
@@ -950,7 +950,7 @@
 #endif
 
 #if HAVE_NATIVE_mpn_rsblsh_nc && ! HAVE_NATIVE_mpn_rsblsh2_nc
-#define mpn_rsblsh2_nc(a,b,c,d)         mpn_rsblsh_nc(a,b,c,d,2)
+#define mpn_rsblsh2_nc(a,b,c,d,x)       mpn_rsblsh_nc(a,b,c,d,2,x)
 #define HAVE_NATIVE_mpn_rsblsh2_nc      2
 #endif
 
diff -r ab0543fdce2a -r 12726da168ff mpn/generic/fib2_ui.c
--- a/mpn/generic/fib2_ui.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpn/generic/fib2_ui.c	Fri Dec 20 21:55:06 2019 +0100
@@ -4,7 +4,7 @@
    CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
    FUTURE GNU MP RELEASES.
 
-Copyright 2001, 2002, 2005, 2009 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2005, 2009, 2018 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r ab0543fdce2a -r 12726da168ff mpz/lucmod.c
--- a/mpz/lucmod.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpz/lucmod.c	Fri Dec 20 21:55:06 2019 +0100
@@ -42,7 +42,7 @@
 /* Requires n > 4; b0 > 0; -2*Q must not overflow a long.	*/
 /* If U_{k+1}==0 (mod n) or V_{k+1}==0 (mod n), it returns 1,	*/
 /* otherwise it returns 0 and sets V=V_{k+1} and Qk=Q^{k+1}.	*/
-/* V will never grove beyond SIZ(n), Qk not beyon 2*SIZ(n).	*/
+/* V will never grow beyond SIZ(n), Qk not beyon 2*SIZ(n).	*/
 int
 mpz_lucas_mod (mpz_ptr V, mpz_ptr Qk, long Q,
 	       mp_bitcnt_t b0, mpz_srcptr n, mpz_ptr T1, mpz_ptr T2)
diff -r ab0543fdce2a -r 12726da168ff mpz/lucnum2_ui.c
--- a/mpz/lucnum2_ui.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpz/lucnum2_ui.c	Fri Dec 20 21:55:06 2019 +0100
@@ -1,6 +1,7 @@
 /* mpz_lucnum2_ui -- calculate Lucas numbers.
 
-Copyright 2001, 2003, 2005, 2012, 2015 Free Software Foundation, Inc.
+Copyright 2001, 2003, 2005, 2012, 2015, 2016, 2018 Free Software
+Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r ab0543fdce2a -r 12726da168ff mpz/lucnum_ui.c
--- a/mpz/lucnum_ui.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpz/lucnum_ui.c	Fri Dec 20 21:55:06 2019 +0100
@@ -1,6 +1,6 @@
 /* mpz_lucnum_ui -- calculate Lucas number.
 
-Copyright 2001, 2003, 2005, 2011, 2012, 2015 Free Software Foundation, Inc.
+Copyright 2001, 2003, 2005, 2011, 2012, 2015, 2016 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r ab0543fdce2a -r 12726da168ff mpz/random2.c
--- a/mpz/random2.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpz/random2.c	Fri Dec 20 21:55:06 2019 +0100
@@ -2,7 +2,8 @@
    long runs of consecutive ones and zeros in the binary representation.
    Meant for testing of other MP routines.
 
-Copyright 1991, 1993, 1994, 1996, 2001, 2012 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 2001, 2012, 2015 Free Software
+Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r ab0543fdce2a -r 12726da168ff mpz/set_f.c
--- a/mpz/set_f.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/mpz/set_f.c	Fri Dec 20 21:55:06 2019 +0100
@@ -1,6 +1,6 @@
 /* mpz_set_f (dest_integer, src_float) -- Assign DEST_INTEGER from SRC_FLOAT.
 
-Copyright 1996, 2001, 2012 Free Software Foundation, Inc.
+Copyright 1996, 2001, 2012, 2016 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r ab0543fdce2a -r 12726da168ff tests/mpf/t-conv.c
--- a/tests/mpf/t-conv.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/tests/mpf/t-conv.c	Fri Dec 20 21:55:06 2019 +0100
@@ -190,14 +190,15 @@
         {
           /* exercise the special case in get_str for for x==0 */
           mpf_set_ui (x, 0L);
-          base = 10;
+          base = 0;
         }
       else
         {
           size = urandom () % (2 * SIZE) - SIZE;
           exp = urandom () % EXPO;
           mpf_random2 (x, size, exp);
-          base = urandom () % 61 + 2;
+          base = urandom () % 62;
+          base += base > 0;
         }
 
       str = mpf_get_str (0, &bexp, base, 0, x);
diff -r ab0543fdce2a -r 12726da168ff tune/speed.c
--- a/tune/speed.c	Mon Dec 09 10:22:42 2019 +0100
+++ b/tune/speed.c	Fri Dec 20 21:55:06 2019 +0100
@@ -289,6 +289,8 @@
   { "mpn_hgcd2_1",       speed_mpn_hgcd2_1, FLAG_NODATA },
   { "mpn_hgcd2_2",       speed_mpn_hgcd2_2, FLAG_NODATA },
   { "mpn_hgcd2_3",       speed_mpn_hgcd2_3, FLAG_NODATA },
+  { "mpn_hgcd2_4",       speed_mpn_hgcd2_4, FLAG_NODATA },
+  { "mpn_hgcd2_5",       speed_mpn_hgcd2_5, FLAG_NODATA },
   { "mpn_hgcd",          speed_mpn_hgcd             },
   { "mpn_hgcd_lehmer",   speed_mpn_hgcd_lehmer      },
   { "mpn_hgcd_appr",     speed_mpn_hgcd_appr        },


More information about the gmp-commit mailing list