summaryrefslogtreecommitdiff
path: root/tests/random2.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-24 16:51:17 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-24 16:51:17 +0000
commit92dc794c8665060ccf30421943920fb188c10f02 (patch)
tree2eec5980f13d695baa5fee0fc2eb994279559b35 /tests/random2.c
parent49406a145c30997c8c82d33696e2b3b1de930e0f (diff)
downloadmpfr-92dc794c8665060ccf30421943920fb188c10f02.tar.gz
urandomb.c mpfr-gmp.c mpfr-gmp.h: mpfr_rand_raw is now in urandom.c.
mpfr-impl.h: mpfr_rand_raw is now always build as an internal function. TODO tests/tests.c tests/random2.c: Use mpfr_rand_raw instead of _gmp_rand git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6137 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/random2.c')
-rw-r--r--tests/random2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/random2.c b/tests/random2.c
index 66739e862..5b769295a 100644
--- a/tests/random2.c
+++ b/tests/random2.c
@@ -68,7 +68,7 @@ mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp,
/* Code extracted from GMP, function mpn_random2, to avoid the use
of GMP's internal random state in MPFR */
- _gmp_rand (&elimb, rstate, BITS_PER_RANDCALL);
+ mpfr_rand_raw (&elimb, rstate, BITS_PER_RANDCALL);
ran = elimb;
/* Start off at a random bit position in the most significant limb. */
@@ -86,7 +86,7 @@ mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp,
{
if (ran_nbits < LOGBITS_PER_BLOCK + 1)
{
- _gmp_rand (&elimb, rstate, BITS_PER_RANDCALL);
+ mpfr_rand_raw (&elimb, rstate, BITS_PER_RANDCALL);
ran = elimb;
ran_nbits = BITS_PER_RANDCALL;
}
@@ -139,7 +139,7 @@ mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp,
}
/* Generate random exponent. */
- _gmp_rand (&elimb, RANDS, BITS_PER_MP_LIMB);
+ mpfr_rand_raw (&elimb, RANDS, BITS_PER_MP_LIMB);
exp = ABS (exp);
MPFR_SET_EXP (x, elimb % (2 * exp + 1) - exp);