[Gmp-commit] /var/hg/gmp: Use independent input sizes for gcd_11 and gcd_22 t...
mercurial at gmplib.org
mercurial at gmplib.org
Fri Aug 16 06:10:14 UTC 2019
details: /var/hg/gmp/rev/3540ef669514
changeset: 17816:3540ef669514
user: Niels M?ller <nisse at lysator.liu.se>
date: Fri Aug 16 08:09:57 2019 +0200
description:
Use independent input sizes for gcd_11 and gcd_22 tests.
diffstat:
tests/mpn/t-gcd_11.c | 11 ++++++-----
tests/mpn/t-gcd_22.c | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r dc279a8fb16c -r 3540ef669514 tests/mpn/t-gcd_11.c
--- a/tests/mpn/t-gcd_11.c Fri Aug 16 08:00:46 2019 +0200
+++ b/tests/mpn/t-gcd_11.c Fri Aug 16 08:09:57 2019 +0200
@@ -58,16 +58,17 @@
for (test = 0; test < count; test++)
{
mp_limb_t al, bl;
- mp_bitcnt_t size = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
+ mp_bitcnt_t asize = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
+ mp_bitcnt_t bsize = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
if (test & 1)
{
- mpz_urandomb (a, rands, size);
- mpz_urandomb (b, rands, size);
+ mpz_urandomb (a, rands, asize);
+ mpz_urandomb (b, rands, bsize);
}
else
{
- mpz_rrandomb (a, rands, size);
- mpz_rrandomb (b, rands, size);
+ mpz_rrandomb (a, rands, asize);
+ mpz_rrandomb (b, rands, bsize);
}
mpz_setbit (a, 0);
diff -r dc279a8fb16c -r 3540ef669514 tests/mpn/t-gcd_22.c
--- a/tests/mpn/t-gcd_22.c Fri Aug 16 08:00:46 2019 +0200
+++ b/tests/mpn/t-gcd_22.c Fri Aug 16 08:09:57 2019 +0200
@@ -59,16 +59,17 @@
mpz_init (ref);
for (test = 0; test < count; test++)
{
- mp_bitcnt_t size = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
+ mp_bitcnt_t asize = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
+ mp_bitcnt_t bsize = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
if (test & 1)
{
- mpz_urandomb (a, rands, size);
- mpz_urandomb (b, rands, size);
+ mpz_urandomb (a, rands, asize);
+ mpz_urandomb (b, rands, bsize);
}
else
{
- mpz_rrandomb (a, rands, size);
- mpz_rrandomb (b, rands, size);
+ mpz_rrandomb (a, rands, asize);
+ mpz_rrandomb (b, rands, bsize);
}
mpz_setbit (a, 0);
More information about the gmp-commit
mailing list