[Gmp-commit] /var/hg/gmp: tests/devel/primes.c: Small corrections.

mercurial at gmplib.org mercurial at gmplib.org
Sat Jan 5 13:17:50 UTC 2019


details:   /var/hg/gmp/rev/69e6ac05fafe
changeset: 17754:69e6ac05fafe
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sat Jan 05 14:17:19 2019 +0100
description:
tests/devel/primes.c: Small corrections.

diffstat:

 tests/devel/primes.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r 8c30f7900f5a -r 69e6ac05fafe tests/devel/primes.c
--- a/tests/devel/primes.c	Sat Jan 05 10:50:38 2019 +0100
+++ b/tests/devel/primes.c	Sat Jan 05 14:17:19 2019 +0100
@@ -140,7 +140,7 @@
 
 	size_s = BLOCK_SIZE * 2;
 	sieve = __GMP_ALLOCATE_FUNC_LIMBS (size_s);
-	off = n_to_bit(begin);
+	off = n_to_bit(begin) + (begin % 3 == 0);
 
 	do {
 	  TRACE (printf ("off =%li\n", off),3);
@@ -158,7 +158,7 @@
 	      {
 		spinner();
 		if ((begin & 0xfffffff) == 0)
-		  printf ("%li (%lx)\n", begin, begin);
+		  printf ("%li (0x%lx)\n", begin, begin);
 	      }
 	  } while (++begin < prime);
 
@@ -198,7 +198,7 @@
 	    {
 	      spinner();
 	      if ((begin & 0xfffffff) == 0)
-		printf ("%li (%lx)\n", begin, begin);
+		printf ("%li (0x%lx)\n", begin, begin);
 	    }
 	} while (++begin < prime);
 
@@ -273,7 +273,7 @@
 	    if (prime - begin > 0xfffffff)
 	      {
 		begin = prime;
-		printf ("%li (%lx)\n", begin, begin);
+		printf ("%li (0x%lx)\n", begin, begin);
 	      }
 	  }
 
@@ -331,6 +331,6 @@
   mpz_clear (g);
 
   if (ret == 0)
-    printf ("Prime tests checked in [%lu - %lu] [%lx - %lx].\n", begin, end, begin, end);
+    printf ("Prime tests checked in [%lu - %lu] [0x%lx - 0x%lx].\n", begin, end, begin, end);
   return ret;
 }


More information about the gmp-commit mailing list