summaryrefslogtreecommitdiff
path: root/tests/tabs.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-06-12 16:13:49 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-06-12 16:13:49 +0000
commit573b63b71ddcfbc2836ee1f37c6fc0bc3accbd0a (patch)
treee94044c2aa8d50e582713343cc6dc9a1d35112cc /tests/tabs.c
parente976dd7979c00f2fc9fc448d151fa74febe3223f (diff)
downloadmpfr-573b63b71ddcfbc2836ee1f37c6fc0bc3accbd0a.tar.gz
Replaced misc random functions by GMP ones.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2329 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tabs.c')
-rw-r--r--tests/tabs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tabs.c b/tests/tabs.c
index aa984f5d5..f0845f2d1 100644
--- a/tests/tabs.c
+++ b/tests/tabs.c
@@ -23,7 +23,9 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include <float.h>
#include "gmp.h"
+#include "gmp-impl.h"
#include "mpfr.h"
+#include "mpfr-impl.h"
#include "mpfr-test.h"
static void
@@ -45,7 +47,7 @@ check_inexact (void)
mpfr_set_prec (x, p);
mpfr_set_prec (absx, p);
mpfr_random (x);
- if (LONG_RAND () % 2)
+ if (randlimb () % 2)
{
mpfr_set (absx, x, GMP_RNDN);
mpfr_neg (x, x, GMP_RNDN);
@@ -124,7 +126,7 @@ main (int argc, char *argv[])
{
do
{
- d = drand ();
+ d = DBL_RAND ();
absd = ABS(d);
}
#ifdef HAVE_DENORMS
@@ -132,7 +134,7 @@ main (int argc, char *argv[])
#else
while (absd < DBL_MIN);
#endif
- rnd = LONG_RAND() % 4;
+ rnd = randlimb () % 4;
mpfr_set_d (x, d, 0);
mpfr_abs (x, x, rnd);
dd = mpfr_get_d1 (x);