summaryrefslogtreecommitdiff
path: root/tests/tui_div.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/tui_div.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/tui_div.c')
-rw-r--r--tests/tui_div.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tui_div.c b/tests/tui_div.c
index 54e557e88..27bd1cdc9 100644
--- a/tests/tui_div.c
+++ b/tests/tui_div.c
@@ -73,7 +73,7 @@ check_inexact (void)
{
mpfr_set_prec (x, px);
mpfr_random (x);
- u = lrand48 ();
+ u = LONG_RAND ();
for (py=2; py<300; py++)
{
mpfr_set_prec (y, py);
@@ -121,15 +121,15 @@ main (int argc, char *argv[])
set_fpc_csr(exp.fc_word);
#endif
- srand48(getpid());
+ SEED_RAND(getpid());
N = (argc<2) ? 1000000 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
for (i=0;i<1000000;i++) {
x = drand();
- y = lrand48();
+ y = LONG_RAND();
if (ABS(x)>4e-286) {
/* avoid denormalized numbers and overflows */
- rnd = (rnd_mode==-1) ? lrand48()%4 : rnd_mode;
+ rnd = (rnd_mode==-1) ? LONG_RAND()%4 : rnd_mode;
check(y, x, rnd, 0.0);
}
}