summaryrefslogtreecommitdiff
path: root/tests/devel
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2019-01-05 14:17:19 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2019-01-05 14:17:19 +0100
commitfb05bd4f3ccadad1a0a5b90f6daf9db2902c6a7c (patch)
treeea9e2b9c65f25b46496589165d77762c96f2ce15 /tests/devel
parent4e6f5b3c6ce72c1998ee70f0c3a24eae6b7cbe21 (diff)
downloadgmp-fb05bd4f3ccadad1a0a5b90f6daf9db2902c6a7c.tar.gz
tests/devel/primes.c: Small corrections.
Diffstat (limited to 'tests/devel')
-rw-r--r--tests/devel/primes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/devel/primes.c b/tests/devel/primes.c
index 1303a43a8..861da9151 100644
--- a/tests/devel/primes.c
+++ b/tests/devel/primes.c
@@ -140,7 +140,7 @@ check_pprime (unsigned long begin, unsigned long end)
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 @@ check_pprime (unsigned long begin, unsigned long end)
{
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 @@ check_pprime (unsigned long begin, unsigned long end)
{
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 @@ check_nprime (unsigned long begin, unsigned long end)
if (prime - begin > 0xfffffff)
{
begin = prime;
- printf ("%li (%lx)\n", begin, begin);
+ printf ("%li (0x%lx)\n", begin, begin);
}
}
@@ -331,6 +331,6 @@ main (int argc, char **argv)
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;
}