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

mercurial at gmplib.org mercurial at gmplib.org
Tue Aug 13 18:10:24 UTC 2019


details:   /var/hg/gmp/rev/18c4ec88548d
changeset: 17805:18c4ec88548d
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Aug 13 20:02:22 2019 +0200
description:
ChangeLogs and copyright years

details:   /var/hg/gmp/rev/3a5d70bef663
changeset: 17806:3a5d70bef663
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Aug 13 20:03:14 2019 +0200
description:
Indent

diffstat:

 ChangeLog              |  11 +++++++++++
 mini-gmp/ChangeLog     |   4 ++++
 mini-gmp/mini-gmp.c    |   2 +-
 mpz/millerrabin.c      |  32 ++++++++++++++++----------------
 tests/misc.c           |   2 +-
 tests/mpz/t-pprime_p.c |   2 +-
 6 files changed, 34 insertions(+), 19 deletions(-)

diffs (109 lines):

diff -r d23f58a30336 -r 3a5d70bef663 ChangeLog
--- a/ChangeLog	Tue Aug 13 19:43:43 2019 +0200
+++ b/ChangeLog	Tue Aug 13 20:03:14 2019 +0200
@@ -1,3 +1,14 @@
+2018-11-07 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	From Seth Troisi:
+	* doc/gmp.texi: Update mpz_millerrabin documentation.
+
+	* mpn/x86_64/bd2/gcd_11.asm: Micro-optimisation.
+	* doc/gmp.texi: Further update in mpz_millerrabin.
+	* tests/misc.c: Silence a warning.
+	* tests/mpz/t-pprime_p.c (const primes): One more prime in the list.
+	* mpz/millerrabin.c: Return 2 for surely prime numbers (BPSW checked).
+
 2019-08-08  Niels Möller  <nisse at lysator.liu.se>
 
 	* tests/refmpn.c (refmpn_gcd_11): New function, based on refmpn_gcd_1.
diff -r d23f58a30336 -r 3a5d70bef663 mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog	Tue Aug 13 19:43:43 2019 +0200
+++ b/mini-gmp/ChangeLog	Tue Aug 13 20:03:14 2019 +0200
@@ -1,3 +1,7 @@
+2018-11-07 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mini-gmp/mini-gmp.c: Silence a couple of warnings.
+
 2018-10-30 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mini-gmp.c (mpz_probab_prime_p): BPSW test for primality.
diff -r d23f58a30336 -r 3a5d70bef663 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Tue Aug 13 19:43:43 2019 +0200
+++ b/mini-gmp/mini-gmp.c	Tue Aug 13 20:03:14 2019 +0200
@@ -2,7 +2,7 @@
 
    Contributed to the GNU project by Niels Möller
 
-Copyright 1991-1997, 1999-2018 Free Software Foundation, Inc.
+Copyright 1991-1997, 1999-2019 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r d23f58a30336 -r 3a5d70bef663 mpz/millerrabin.c
--- a/mpz/millerrabin.c	Tue Aug 13 19:43:43 2019 +0200
+++ b/mpz/millerrabin.c	Tue Aug 13 20:03:14 2019 +0200
@@ -139,26 +139,26 @@
 	is_prime = 2;
       else
 	{
-  reps -= 24;
-  if (reps > 0)
-    {
-      /* (n-5)/2 */
-      mpz_sub_ui (nm, nm, 2L);
-      ASSERT (mpz_cmp_ui (nm, 1L) >= 0);
+	  reps -= 24;
+	  if (reps > 0)
+	    {
+	      /* (n-5)/2 */
+	      mpz_sub_ui (nm, nm, 2L);
+	      ASSERT (mpz_cmp_ui (nm, 1L) >= 0);
 
-      gmp_randinit_default (rstate);
+	      gmp_randinit_default (rstate);
 
-      do
-	{
-	  /* 3 to (n-1)/2 inclusive, don't want 1, 0 or 2 */
-	  mpz_urandomm (x, rstate, nm);
-	  mpz_add_ui (x, x, 3L);
+	      do
+		{
+		  /* 3 to (n-1)/2 inclusive, don't want 1, 0 or 2 */
+		  mpz_urandomm (x, rstate, nm);
+		  mpz_add_ui (x, x, 3L);
 
-	  is_prime = millerrabin (n, x, y, q, k);
-	} while (--reps > 0 && is_prime);
+		  is_prime = millerrabin (n, x, y, q, k);
+		} while (--reps > 0 && is_prime);
 
-      gmp_randclear (rstate);
-    }
+	      gmp_randclear (rstate);
+	    }
 	}
     }
   TMP_FREE;
diff -r d23f58a30336 -r 3a5d70bef663 tests/misc.c
--- a/tests/misc.c	Tue Aug 13 19:43:43 2019 +0200
+++ b/tests/misc.c	Tue Aug 13 20:03:14 2019 +0200
@@ -1,6 +1,6 @@
 /* Miscellaneous test program support routines.
 
-Copyright 2000-2003, 2005, 2013, 2015 Free Software Foundation, Inc.
+Copyright 2000-2003, 2005, 2013, 2015, 2019 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
diff -r d23f58a30336 -r 3a5d70bef663 tests/mpz/t-pprime_p.c
--- a/tests/mpz/t-pprime_p.c	Tue Aug 13 19:43:43 2019 +0200
+++ b/tests/mpz/t-pprime_p.c	Tue Aug 13 20:03:14 2019 +0200
@@ -1,6 +1,6 @@
 /* Exercise mpz_probab_prime_p.
 
-Copyright 2002, 2018 Free Software Foundation, Inc.
+Copyright 2002, 2018-2019 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 


More information about the gmp-commit mailing list