summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-10 12:13:25 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-10 12:13:25 +0000
commit610a8851990d905908fae318fc91dda3b21ee270 (patch)
tree69a66b428bab8b1c92dd69410874dcd7089b84ca /tests
parent11b100b3ef4098c0afc5f5f82a9600077ff89ee9 (diff)
downloadmpfr-610a8851990d905908fae318fc91dda3b21ee270.tar.gz
HAVE_FESETROUND renamed to MPFR_HAVE_FESETROUND to avoid possible
name conflict. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1844 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/tadd.c10
-rw-r--r--tests/tadd_ui.c4
-rw-r--r--tests/tagm.c2
-rw-r--r--tests/tdiv.c6
-rw-r--r--tests/tdiv_ui.c4
-rw-r--r--tests/texp.c6
-rw-r--r--tests/tget_d.c2
-rw-r--r--tests/tget_str.c4
-rw-r--r--tests/tlog.c2
-rw-r--r--tests/tmul.c6
-rw-r--r--tests/tset_q.c4
-rw-r--r--tests/tsqrt.c4
-rw-r--r--tests/tsqrt_ui.c4
-rw-r--r--tests/tsub_ui.c4
-rw-r--r--tests/tui_div.c4
-rw-r--r--tests/tui_sub.c4
16 files changed, 35 insertions, 35 deletions
diff --git a/tests/tadd.c b/tests/tadd.c
index 25d35b4fd..3393ed673 100644
--- a/tests/tadd.c
+++ b/tests/tadd.c
@@ -56,7 +56,7 @@ check (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_add(zz, xx, yy, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
if (px==53 && py==53 && pz==53) cert=1;
#endif
@@ -84,7 +84,7 @@ checknan (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_add(zz, xx, yy, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (MPFR_IS_NAN(zz) == 0) { printf("Error, not an MPFR_NAN for xx = %1.20e, y = %1.20e\n", x, y); exit(1); }
@@ -94,7 +94,7 @@ checknan (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_clear(xx); mpfr_clear(yy); mpfr_clear(zz);
}
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
/* idem than check for mpfr_add(x, x, y) */
void
check3 (double x, double y, mp_rnd_t rnd_mode)
@@ -640,7 +640,7 @@ check_inexact (void)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int prec, rnd_mode;
int rnd;
double y;
@@ -835,7 +835,7 @@ main (int argc, char *argv[])
check53(9007199254740994.0, -1.0, GMP_RNDN, 9007199254740992.0);
check53(9007199254740996.0, -1.0, GMP_RNDN, 9007199254740996.0);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
prec = (argc<2) ? 53 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
/* Comparing to double precision using machine arithmetic */
diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c
index 45c9d3eff..dcc2695ab 100644
--- a/tests/tadd_ui.c
+++ b/tests/tadd_ui.c
@@ -47,7 +47,7 @@ check3 (double x, unsigned long y, unsigned int rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_add_ui(zz, xx, y, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = x+y;
@@ -77,7 +77,7 @@ special (void)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
double x; unsigned long y, N; int i,rnd_mode,rnd;
mpfr_test_init ();
diff --git a/tests/tagm.c b/tests/tagm.c
index 3e80b1491..513294b10 100644
--- a/tests/tagm.c
+++ b/tests/tagm.c
@@ -89,7 +89,7 @@ check4 (double a, double b, mp_rnd_t rnd_mode, double res1)
mpfr_set_d(tb, b, rnd_mode);
mpfr_agm(tres, ta, tb, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
diff --git a/tests/tdiv.c b/tests/tdiv.c
index 8438bbeb6..879207a07 100644
--- a/tests/tdiv.c
+++ b/tests/tdiv.c
@@ -47,7 +47,7 @@ check4 (double N, double D, mp_rnd_t rnd_mode, int p, double Q)
mpfr_set_d(n, N, rnd_mode);
mpfr_set_d(d, D, rnd_mode);
mpfr_div(q, n, d, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (Q==0.0) Q = N/D;
@@ -451,7 +451,7 @@ main (int argc, char *argv[])
{
mpfr_t x, y, z;
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int N, i;
double n, d, e;
@@ -494,7 +494,7 @@ main (int argc, char *argv[])
check53(1.04636807108079349236e-189, 3.72295730823253012954e-292, GMP_RNDZ,
2.810583051186143125e102);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
N = (argc>1) ? atoi(argv[1]) : 100000;
SEED_RAND (time(NULL));
for (i=0;i<N;i++)
diff --git a/tests/tdiv_ui.c b/tests/tdiv_ui.c
index 3b6076f3d..3380dfd8f 100644
--- a/tests/tdiv_ui.c
+++ b/tests/tdiv_ui.c
@@ -37,7 +37,7 @@ check (double d, unsigned long u, mp_rnd_t rnd, double e)
double f;
mpfr_init2(x, 53); mpfr_init2(y, 53);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd);
#endif
if (e==0.0) e = d / u;
@@ -174,7 +174,7 @@ int
main (int argc, char **argv)
{
mpfr_t x;
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int i;
unsigned long u;
double d;
diff --git a/tests/texp.c b/tests/texp.c
index 2193a2dcb..89fec889c 100644
--- a/tests/texp.c
+++ b/tests/texp.c
@@ -46,7 +46,7 @@ check3 (double d, mp_rnd_t rnd, double e)
mpfr_t x, y; double f; int u=0, ck=0;
mpfr_init2(x, 53); mpfr_init2(y, 53);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd);
#endif
if (e==0.0) e = exp(d); else ck=1; /* really check */
@@ -216,7 +216,7 @@ compare_exp2_exp3 (int n)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int i, N, s=0, e, maxe=0;
double lo, hi;
#endif
@@ -272,7 +272,7 @@ main (int argc, char *argv[])
check3(5.30015757134837031117e+02, GMP_RNDD, 1.5237672861171573939e230);
check3(5.16239362447650933063e+02, GMP_RNDZ, 1.5845518406744492105e224);
check3(6.00812634798592370977e-01, GMP_RNDN, 1.823600119339019443);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
SEED_RAND (time(NULL));
N = (argc==1) ? 0 : atoi(argv[1]);
lo = (argc>=3) ? atof(argv[2]) : -7.083964185e2;
diff --git a/tests/tget_d.c b/tests/tget_d.c
index c98056d8d..6f2881cdc 100644
--- a/tests/tget_d.c
+++ b/tests/tget_d.c
@@ -61,7 +61,7 @@ int
main (void)
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_t half, x, y;
mp_rnd_t rnd_mode;
diff --git a/tests/tget_str.c b/tests/tget_str.c
index ea49c4069..78addec7e 100644
--- a/tests/tget_str.c
+++ b/tests/tget_str.c
@@ -26,7 +26,7 @@ MA 02111-1307, USA. */
#include <time.h>
#include "gmp.h"
#include "mpfr.h"
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
#include "mpfr-test.h"
#endif
@@ -105,7 +105,7 @@ check_small (void)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int i;
double d;
diff --git a/tests/tlog.c b/tests/tlog.c
index 55fdd70bc..ca5901f33 100644
--- a/tests/tlog.c
+++ b/tests/tlog.c
@@ -67,7 +67,7 @@ check1 (double a, mp_rnd_t rnd_mode, double res1, int ck, int max_ulp)
int diff=0;
/* ck=1 iff res1 is certified correct */
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (ck==0 && res1==0.0) res1=log(a);
diff --git a/tests/tmul.c b/tests/tmul.c
index acd2cd393..c15d82d18 100644
--- a/tests/tmul.c
+++ b/tests/tmul.c
@@ -52,7 +52,7 @@ check (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_mul(zz, xx, yy, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
z1 = (res==0.0) ? x*y : res;
@@ -349,7 +349,7 @@ check_min(void)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
double x, y, z;
int i, prec, rnd_mode;
@@ -389,7 +389,7 @@ main (int argc, char *argv[])
49, 3, 2, 0.09375);
check_max();
check_min();
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
SEED_RAND (time(NULL));
prec = (argc<2) ? 53 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
diff --git a/tests/tset_q.c b/tests/tset_q.c
index b26d39119..a3697352d 100644
--- a/tests/tset_q.c
+++ b/tests/tset_q.c
@@ -40,7 +40,7 @@ check (long int n, long int d, mp_rnd_t rnd, double y)
mpfr_init2 (t, mpfr_get_prec (x) + mp_bits_per_limb);
mpq_init (q);
mpq_set_si (q, n, d);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode (rnd);
y = (double) n / d;
#endif
@@ -80,7 +80,7 @@ check (long int n, long int d, mp_rnd_t rnd, double y)
int
main (void)
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
long int i, n;
unsigned long int d;
double y;
diff --git a/tests/tsqrt.c b/tests/tsqrt.c
index 5cd5e4ffa..1144c7827 100644
--- a/tests/tsqrt.c
+++ b/tests/tsqrt.c
@@ -49,7 +49,7 @@ check3 (double a, mp_rnd_t rnd_mode, double Q)
ck = (Q!=-1.0); /* if ck=1, then Q is certified correct */
mpfr_init2(q, 53);
mpfr_set_d(q, a, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
mpfr_sqrt(q, q, rnd_mode);
@@ -326,7 +326,7 @@ main (void)
double a;
mp_prec_t p;
int k;
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int i;
mpfr_test_init ();
diff --git a/tests/tsqrt_ui.c b/tests/tsqrt_ui.c
index aab744847..d84e16802 100644
--- a/tests/tsqrt_ui.c
+++ b/tests/tsqrt_ui.c
@@ -37,7 +37,7 @@ check (unsigned long a, mp_rnd_t rnd_mode, double Q)
mpfr_t q; double Q2; int u, ck;
mpfr_init2(q, 53);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
mpfr_sqrt_ui(q, a, rnd_mode);
@@ -59,7 +59,7 @@ check (unsigned long a, mp_rnd_t rnd_mode, double Q)
int
main (void)
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
int i;
unsigned long a;
diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c
index da1e222bb..93978e4b2 100644
--- a/tests/tsub_ui.c
+++ b/tests/tsub_ui.c
@@ -47,7 +47,7 @@ check3 (double x, unsigned long y, mp_rnd_t rnd_mode, double z1)
mpfr_set_prec(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_sub_ui(zz, xx, y, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = x-y;
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
{
mp_prec_t p;
int k;
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
double x; unsigned long y, N; int i,rnd_mode,rnd;
mpfr_test_init ();
diff --git a/tests/tui_div.c b/tests/tui_div.c
index 9f0d99724..f04c15b44 100644
--- a/tests/tui_div.c
+++ b/tests/tui_div.c
@@ -44,7 +44,7 @@ check (unsigned long y, double x, mp_rnd_t rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_ui_div(zz, y, xx, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = y/x;
@@ -152,7 +152,7 @@ check_nan (void)
int
main (int argc, char *argv[])
{
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
double x;
unsigned long y, N;
int i, rnd_mode, rnd;
diff --git a/tests/tui_sub.c b/tests/tui_sub.c
index bfbdd60d2..69894e5ba 100644
--- a/tests/tui_sub.c
+++ b/tests/tui_sub.c
@@ -140,7 +140,7 @@ check (unsigned long y, double x, mp_rnd_t rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_ui_sub(zz, y, xx, rnd_mode);
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = y-x;
@@ -204,7 +204,7 @@ main (int argc, char *argv[])
{
mp_prec_t p;
unsigned k;
-#ifdef HAVE_FESETROUND
+#ifdef MPFR_HAVE_FESETROUND
double x;
unsigned long y, N;
int i, rnd_mode, rnd;