summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2004-02-28 19:44:21 +0100
committerKevin Ryde <user42@zip.com.au>2004-02-28 19:44:21 +0100
commit2ceb1c2e94ac58f36bcb727c2a2f730ba1c56e23 (patch)
tree0fd644feb977e0685919d3f989fed35118d45607
parent89dd0f7d8967771d6ae5d958dd1aca6585a65481 (diff)
downloadgmp-2ceb1c2e94ac58f36bcb727c2a2f730ba1c56e23.tar.gz
* tests/mpn/t-get_d.c (check_rand): Correction to nhigh_mask setup.
And turn down the reps a bit.
-rw-r--r--tests/mpn/t-get_d.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mpn/t-get_d.c b/tests/mpn/t-get_d.c
index 833366d1d..f092e6181 100644
--- a/tests/mpn/t-get_d.c
+++ b/tests/mpn/t-get_d.c
@@ -1,6 +1,6 @@
/* Test mpn_get_d.
-Copyright 2002, 2003 Free Software Foundation, Inc.
+Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -427,15 +427,18 @@ check_rand (void)
exp_min = -100 - mant_bits;
exp_max = 100 - mant_bits;
+ /* space for mant_bits */
nalloc = BITS_TO_LIMBS (mant_bits);
np = refmpn_malloc_limbs (nalloc);
nhigh_mask = MP_LIMB_T_MAX
- >> (GMP_NAIL_BITS + nsize * GMP_NUMB_BITS - mant_bits);
+ >> (GMP_NAIL_BITS + nalloc * GMP_NUMB_BITS - mant_bits);
- for (rep = 0; rep < 500; rep++)
+ for (rep = 0; rep < 200; rep++)
{
+ /* random exp_min to exp_max, inclusive */
exp = exp_min + (long) gmp_urandomm_ui (rands, exp_max - exp_min + 1);
+ /* mant_bits worth of random at np */
if (rep & 1)
mpn_random (np, nalloc);
else