summaryrefslogtreecommitdiff
path: root/tests/tget_d.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-21 15:35:48 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-21 15:35:48 +0000
commit7563e1b2676d837c96ed25e361a5e9dd714567dc (patch)
tree33906130053295abaaf74e98f81b794b8eece54b /tests/tget_d.c
parent0df22d500aef3b11656722b40e21890ee1a5c531 (diff)
downloadmpfr-7563e1b2676d837c96ed25e361a5e9dd714567dc.tar.gz
replaced rand/lrand48, drand48, srand/srand48 by macros
LONG_RAND, DBL_RAND, SEED_RAND and time(NULL) by getpid() git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1762 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_d.c')
-rw-r--r--tests/tget_d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tget_d.c b/tests/tget_d.c
index 3e23cb96d..1b31af5a8 100644
--- a/tests/tget_d.c
+++ b/tests/tget_d.c
@@ -64,7 +64,7 @@ main (void)
mpfr_div_2ui(y, half, j, GMP_RNDZ);
(sj ? mpfr_sub : mpfr_add)(y, x, y, GMP_RNDZ);
- exp = (rand() % 47) - 23;
+ exp = (LONG_RAND() % 47) - 23;
mpfr_mul_2si(y, y, exp, GMP_RNDZ);
if (mpfr_inexflag_p())
{
@@ -75,14 +75,14 @@ main (void)
}
dd = si != sj ? di - dj : di + dj;
d = si ? 0.5 - dd : 0.5 + dd;
- if ((rand() / 1024) & 1)
+ if ((LONG_RAND() / 1024) & 1)
{
c = mpfr_get_d2(y, rnd_mode);
f = "mpfr_get_d2";
}
else
{
- exp = (rand() % 47) - 23;
+ exp = (LONG_RAND() % 47) - 23;
c = mpfr_get_d3(y, exp, rnd_mode);
f = "mpfr_get_d3";
if (si) /* then real d < 0.5 */