summaryrefslogtreecommitdiff
path: root/tests/tset_f.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/tset_f.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/tset_f.c')
-rw-r--r--tests/tset_f.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/tset_f.c b/tests/tset_f.c
index f2bb6ff88..351f1fd15 100644
--- a/tests/tset_f.c
+++ b/tests/tset_f.c
@@ -1,6 +1,6 @@
/* Test file for mpfr_set_f.
-Copyright 1999, 2001 Free Software Foundation, Inc.
+Copyright 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -23,7 +23,6 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include "gmp.h"
#include "mpfr.h"
-#include "time.h"
#include "mpfr-test.h"
int
@@ -43,9 +42,9 @@ main (void)
mpfr_set_prec (x, 100);
mpfr_set_f (x, y, GMP_RNDN);
- srandom((int)time(NULL));
+ SEED_RAND (getpid ());
mpf_random2(y, 10, 0);
- mpfr_set_f(x, y, rand() & 3);
+ mpfr_set_f(x, y, LONG_RAND() & 3);
/* bug found by Jean-Pierre Merlet */
mpfr_set_prec(x, 256);
@@ -71,7 +70,7 @@ main (void)
for (k = 1; k <= 100000; k++)
{
- pr = 2 + (rand()&255);
+ pr = 2 + (LONG_RAND()&255);
mpf_set_prec (z, pr);
mpf_random2 (z, z->_mp_prec, 0);
mpfr_init2 (x, pr);