summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/memory.c2
-rw-r--r--tests/reuse.c8
-rw-r--r--tests/tabs.c4
-rw-r--r--tests/tacos.c6
-rw-r--r--tests/tadd_ui.c4
-rw-r--r--tests/tagm.c6
-rw-r--r--tests/tasin.c2
-rw-r--r--tests/tatan.c12
-rw-r--r--tests/tcan_round.c4
-rw-r--r--tests/tcheck.c2
-rw-r--r--tests/tcmp.c10
-rw-r--r--tests/tcmp_ld.c2
-rw-r--r--tests/tcmp_ui.c8
-rw-r--r--tests/tcmpabs.c12
-rw-r--r--tests/tconst_log2.c6
-rw-r--r--tests/tcos.c8
-rw-r--r--tests/tcosh.c6
-rw-r--r--tests/tdiv.c12
-rw-r--r--tests/teq.c2
-rw-r--r--tests/terf.c8
-rw-r--r--tests/tests.c2
-rw-r--r--tests/texceptions.c6
-rw-r--r--tests/texp.c6
-rw-r--r--tests/tfits.c4
-rw-r--r--tests/tfma.c2
-rw-r--r--tests/tgamma.c6
-rw-r--r--tests/tgeneric.c2
-rw-r--r--tests/tgeneric_ui.c2
-rw-r--r--tests/tget_sj.c6
-rw-r--r--tests/tget_str.c16
-rw-r--r--tests/tget_z.c6
-rw-r--r--tests/tgmpop.c14
-rw-r--r--tests/tinp_str.c2
-rw-r--r--tests/tlog.c12
-rw-r--r--tests/tlog10.c2
-rw-r--r--tests/tlog1p.c2
-rw-r--r--tests/tlog2.c2
-rw-r--r--tests/tminmax.c2
-rw-r--r--tests/tmul.c24
-rw-r--r--tests/tmul_ui.c2
-rw-r--r--tests/tout_str.c2
-rw-r--r--tests/toutimpl.c8
-rw-r--r--tests/tpow_z.c10
-rw-r--r--tests/trandom.c46
-rw-r--r--tests/trint.c4
-rw-r--r--tests/tset_si.c10
-rw-r--r--tests/tset_sj.c16
-rw-r--r--tests/tset_str.c6
-rw-r--r--tests/tset_z.c2
-rw-r--r--tests/tsi_op.c6
-rw-r--r--tests/tsin.c2
-rw-r--r--tests/tsin_cos.c6
-rw-r--r--tests/tsqr.c10
-rw-r--r--tests/tsqrt.c4
-rw-r--r--tests/tstrtofr.c64
-rw-r--r--tests/tsub_ui.c2
-rw-r--r--tests/ttan.c2
-rw-r--r--tests/ttanh.c2
-rw-r--r--tests/ttrunc.c2
-rw-r--r--tests/tzeta.c2
60 files changed, 225 insertions, 225 deletions
diff --git a/tests/memory.c b/tests/memory.c
index 27ae16516..5c9757453 100644
--- a/tests/memory.c
+++ b/tests/memory.c
@@ -5,7 +5,7 @@ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
ChangeLog:
- tests_memory_valid has been commented out since it is not used
+ tests_memory_valid has been commented out since it is not used
tests_memory_list is declared as static
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/tests/reuse.c b/tests/reuse.c
index 50a4f7014..73245e79e 100644
--- a/tests/reuse.c
+++ b/tests/reuse.c
@@ -29,13 +29,13 @@ MA 02110-1301, USA. */
#define SPECIAL_MAX 12
-static void
+static void
set_special (mpfr_ptr x, unsigned int select)
{
MPFR_ASSERTN (select < SPECIAL_MAX);
- switch (select)
+ switch (select)
{
- case 0:
+ case 0:
MPFR_SET_NAN (x);
break;
case 1:
@@ -318,7 +318,7 @@ test2ui (int (*testfunc)(mpfr_ptr, mpfr_srcptr, unsigned long int, mp_rnd_t),
if (mpfr_compare (res1, ref1))
{
printf ("Error for %s(a, a, c) for c=%u\n", foo, ref3);
- DISP2("a=",ref2);
+ DISP2("a=",ref2);
printf ("expected "); mpfr_print_binary (ref1); puts ("");
printf ("got "); mpfr_print_binary (res1); puts ("");
exit (1);
diff --git a/tests/tabs.c b/tests/tabs.c
index 896a1bdeb..092c6b7b0 100644
--- a/tests/tabs.c
+++ b/tests/tabs.c
@@ -142,10 +142,10 @@ check_cmp(int argc, char *argv[])
MPFR_SET_POS(x);
if (mpfr_cmp(x,y))
{
- printf ("Mismatch for sign=%d and x=", sign);
+ printf ("Mismatch for sign=%d and x=", sign);
mpfr_print_binary(x);
printf ("\nResults=");
- mpfr_print_binary(y);
+ mpfr_print_binary(y);
putchar ('\n');
exit (1);
}
diff --git a/tests/tacos.c b/tests/tacos.c
index 7832ee640..3719c1af2 100644
--- a/tests/tacos.c
+++ b/tests/tacos.c
@@ -33,7 +33,7 @@ special (void)
{
mpfr_t x, y;
int inex1, inex2;
-
+
mpfr_init2 (x, 32);
mpfr_init2 (y, 32);
@@ -55,14 +55,14 @@ special (void)
mpfr_print_binary (y); printf ("\n");
exit (1);
}
-
+
mpfr_set_prec (x, 2);
mpfr_set_ui (x, 0, GMP_RNDN);
inex1 = mpfr_acos (x, x, GMP_RNDN); /* Pi/2 */
inex2 = mpfr_const_pi (x, GMP_RNDN);
if (inex1 != inex2)
{
- printf ("Error in mpfr_acos (3) for prec=2\n");
+ printf ("Error in mpfr_acos (3) for prec=2\n");
exit (1);
}
diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c
index 11933fd72..4e1c36726 100644
--- a/tests/tadd_ui.c
+++ b/tests/tadd_ui.c
@@ -103,11 +103,11 @@ main (int argc, char *argv[])
special ();
check3 ("-1.716113812768534e-140", 1271212614, GMP_RNDZ,
"1.27121261399999976e9");
- check3 ("1.22191250737771397120e+20", 948002822, GMP_RNDN,
+ check3 ("1.22191250737771397120e+20", 948002822, GMP_RNDN,
"122191250738719408128.0");
check3 ("-6.72658901114033715233e-165", 2000878121, GMP_RNDZ,
"2.0008781209999997615e9");
- check3 ("-2.0769715792901673e-5", 880524, GMP_RNDN,
+ check3 ("-2.0769715792901673e-5", 880524, GMP_RNDN,
"8.8052399997923023e5");
test_generic_ui (2, 1000, 100);
diff --git a/tests/tagm.c b/tests/tagm.c
index f58c9b8e8..4fc0de3e1 100644
--- a/tests/tagm.c
+++ b/tests/tagm.c
@@ -196,9 +196,9 @@ main (int argc, char* argv[])
{
MPFR_TEST_USE_RANDS ();
tests_start_mpfr ();
-
+
check_nans ();
-
+
check_large ();
check4 ("2.0", "1.0", GMP_RNDN, "1.45679103104690677029");
check4 ("6.0", "4.0", GMP_RNDN, "4.94936087247260925182");
@@ -212,6 +212,6 @@ main (int argc, char* argv[])
"7.55393356971199025907e-02");
test_generic (2, 300, 17);
- tests_end_mpfr ();
+ tests_end_mpfr ();
return 0;
}
diff --git a/tests/tasin.c b/tests/tasin.c
index 77a6511cc..415180556 100644
--- a/tests/tasin.c
+++ b/tests/tasin.c
@@ -149,7 +149,7 @@ special (void)
}
mpfr_set_prec (x, 9);
- mpfr_set_prec (y, 19);
+ mpfr_set_prec (y, 19);
mpfr_set_str_binary (x, "0.110000000E-6");
mpfr_asin (y, x, GMP_RNDD);
mpfr_set_prec (x, 19);
diff --git a/tests/tatan.c b/tests/tatan.c
index bb4c4afe9..0a5ea071b 100644
--- a/tests/tatan.c
+++ b/tests/tatan.c
@@ -164,10 +164,10 @@ special (void)
/* Test regression */
mpfr_set_prec (x, 51);
mpfr_set_prec (y, 51);
- mpfr_set_str_binary (x,
+ mpfr_set_str_binary (x,
"0.101100100000101111111010001111111000001000000000000E-11");
i = mpfr_atan (y, x, GMP_RNDN);
- if (mpfr_cmp_str (y,
+ if (mpfr_cmp_str (y,
"1.01100100000101111111001110011001010110100100000000e-12", 2, GMP_RNDN)
|| i >= 0)
{
@@ -175,7 +175,7 @@ special (void)
mpfr_dump (y);
exit (1);
}
-
+
mpfr_set_si (x, -1, GMP_RNDN);
mpfr_atan (x, x, GMP_RNDN);
MPFR_ASSERTN (MPFR_IS_NEG (x));
@@ -190,7 +190,7 @@ special (void)
printf ("Error in mpfr_atan (4)\n");
printf ("Input 1.11001110010000011111100000010000000000000000000e-19 [prec=48]\n");
printf ("Expected 0.111001110010000011111100000001111111110000010011E-18\n");
- printf ("Got "); mpfr_dump (y);
+ printf ("Got "); mpfr_dump (y);
exit (1);
}
@@ -258,7 +258,7 @@ special_atan2 (void)
/* 0+ 0+ --> 0+ */
mpfr_set_ui (y, 0, GMP_RNDN);
mpfr_atan2 (z, y, x, GMP_RNDN);
- MPFR_ASSERTN (MPFR_IS_ZERO (z) && MPFR_IS_POS (z));
+ MPFR_ASSERTN (MPFR_IS_ZERO (z) && MPFR_IS_POS (z));
/* 0- 0+ --> 0- */
MPFR_CHANGE_SIGN (y);
mpfr_atan2 (z, y, x, GMP_RNDN);
@@ -275,7 +275,7 @@ special_atan2 (void)
mpfr_set_si (x, -1, GMP_RNDN);
mpfr_atan2 (z, y, x, GMP_RNDN);
MPFR_ASSERTN (mpfr_cmp_str (z, "3.1415", 10, GMP_RNDN) == 0);
- /* 0- -1 --> -PI */
+ /* 0- -1 --> -PI */
MPFR_CHANGE_SIGN (y);
mpfr_atan2 (z, y, x, GMP_RNDN);
MPFR_ASSERTN (mpfr_cmp_str (z, "-3.1415", 10, GMP_RNDN) == 0);
diff --git a/tests/tcan_round.c b/tests/tcan_round.c
index 06532f53d..7310bb62a 100644
--- a/tests/tcan_round.c
+++ b/tests/tcan_round.c
@@ -68,14 +68,14 @@ main (void)
/* checks that rounds to nearest sets the last
bit to zero in case of equal distance */
mpfr_init2 (x, 59);
- mpfr_set_str_binary (x, "-0.10010001010111000011110010111010111110000000111101100111111E663");
+ mpfr_set_str_binary (x, "-0.10010001010111000011110010111010111110000000111101100111111E663");
if (mpfr_can_round (x, 54, GMP_RNDZ, GMP_RNDZ, 53) != 0)
{
printf ("Error (1) in mpfr_can_round\n");
exit (1);
}
- mpfr_set_str_binary (x, "-Inf");
+ mpfr_set_str_binary (x, "-Inf");
if (mpfr_can_round (x, 2000, GMP_RNDZ, GMP_RNDZ, 2000) != 0)
{
printf ("Error (2) in mpfr_can_round\n");
diff --git a/tests/tcheck.c b/tests/tcheck.c
index 547943692..125a2956d 100644
--- a/tests/tcheck.c
+++ b/tests/tcheck.c
@@ -34,7 +34,7 @@ main (void)
mp_size_t s;
mpfr_prec_t pr;
int max;
-
+
tests_start_mpfr ();
for(pr = MPFR_PREC_MIN ; pr < 500 ; pr++)
{
diff --git a/tests/tcmp.c b/tests/tcmp.c
index dbf5ccc92..be2c3ca47 100644
--- a/tests/tcmp.c
+++ b/tests/tcmp.c
@@ -187,31 +187,31 @@ main (void)
}
}
}
-
+
/* Check for NAN */
mpfr_set_nan (xx);
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (xx, yy);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (1)\n");
exit (1);
}
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (yy, xx);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (2)\n");
exit (1);
}
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (xx, xx);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (3)\n");
exit (1);
}
-
+
mpfr_clear (xx);
mpfr_clear (yy);
diff --git a/tests/tcmp_ld.c b/tests/tcmp_ld.c
index 6ecd4ca79..81bcd296a 100644
--- a/tests/tcmp_ld.c
+++ b/tests/tcmp_ld.c
@@ -32,7 +32,7 @@ main (void)
tests_start_mpfr ();
mpfr_init2(x, MPFR_LDBL_MANT_DIG);
-
+
mpfr_set_ld (x, 2.34763465, GMP_RNDN);
if (mpfr_cmp_ld(x, 2.34763465)!=0) {
printf("Error in mpfr_cmp_ld 2.34763465 and ");
diff --git a/tests/tcmp_ui.c b/tests/tcmp_ui.c
index 609c51fcb..fd645de8c 100644
--- a/tests/tcmp_ui.c
+++ b/tests/tcmp_ui.c
@@ -27,8 +27,8 @@ MA 02110-1301, USA. */
int
main (void)
{
- mpfr_t x;
- unsigned long i;
+ mpfr_t x;
+ unsigned long i;
long s;
int c;
@@ -154,14 +154,14 @@ main (void)
mpfr_set_nan (x);
mpfr_clear_erangeflag ();
c = mpfr_cmp_ui (x, 12);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (1)\n");
exit (1);
}
mpfr_clear_erangeflag ();
c = mpfr_cmp_si (x, -12);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (2)\n");
exit (1);
diff --git a/tests/tcmpabs.c b/tests/tcmpabs.c
index c3e1e6cc7..5f199c274 100644
--- a/tests/tcmpabs.c
+++ b/tests/tcmpabs.c
@@ -56,20 +56,20 @@ main (void)
mpfr_set_str_binary (yy, "0.10011010101000110101010000000011001001001110001011101011111011100E623");
if (mpfr_cmpabs (xx, yy) <= 0)
ERROR ("Error (1) in mpfr_cmpabs\n");
-
+
mpfr_set_str_binary (xx, "-0.10100010001110110111000010001000010011111101000100011101000011100");
mpfr_set_str_binary (yy, "-0.10100010001110110111000010001000010011111101000100011101000011011");
if (mpfr_cmpabs (xx, yy) <= 0)
ERROR ("Error (2) in mpfr_cmpabs\n");
- mpfr_set_prec (xx, 160);
+ mpfr_set_prec (xx, 160);
mpfr_set_prec (yy, 160);
mpfr_set_str_binary (xx, "0.1E1");
mpfr_set_str_binary (yy, "-0.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000110001110100");
if (mpfr_cmpabs (xx, yy) <= 0)
ERROR ("Error (3) in mpfr_cmpabs\n");
- mpfr_set_prec(xx, 53);
+ mpfr_set_prec(xx, 53);
mpfr_set_prec(yy, 200);
mpfr_set_ui (xx, 1, (mp_rnd_t) 0);
mpfr_set_ui (yy, 1, (mp_rnd_t) 0);
@@ -120,21 +120,21 @@ main (void)
mpfr_set_nan (xx);
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (xx, yy);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (1)\n");
exit (1);
}
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (yy, xx);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (2)\n");
exit (1);
}
mpfr_clear_erangeflag ();
c = (mpfr_cmp) (xx, xx);
- if (c != 0 || !mpfr_erangeflag_p () )
+ if (c != 0 || !mpfr_erangeflag_p () )
{
printf ("NAN error (3)\n");
exit (1);
diff --git a/tests/tconst_log2.c b/tests/tconst_log2.c
index 33b0d43e4..a593b9f12 100644
--- a/tests/tconst_log2.c
+++ b/tests/tconst_log2.c
@@ -47,7 +47,7 @@ check (mp_prec_t p0, mp_prec_t p1)
rnd = (mp_rnd_t) RND_RAND ();
mpfr_const_log2 (x, rnd);
mpfr_set (y, z, rnd);
- if ((dif = mpfr_cmp (x, y))
+ if ((dif = mpfr_cmp (x, y))
&& mpfr_can_round (z, mpfr_get_prec(z), GMP_RNDN,
rnd, p0))
{
@@ -80,11 +80,11 @@ check_large (void)
exit (1);
}
- /* worst-case with 15 successive ones after last bit,
+ /* worst-case with 15 successive ones after last bit,
to exercise can_round loop */
mpfr_set_prec (x, 26249);
mpfr_const_log2 (x, GMP_RNDZ);
-
+
mpfr_clears (x, y, NULL);
}
diff --git a/tests/tcos.c b/tests/tcos.c
index fa6c5671e..876f1ee1e 100644
--- a/tests/tcos.c
+++ b/tests/tcos.c
@@ -57,7 +57,7 @@ check53 (const char *xs, const char *cos_xs, mp_rnd_t rnd_mode)
test_cos (c, xx, rnd_mode);
if (mpfr_cmp_str1 (c, cos_xs))
{
- printf ("mpfr_cos failed for x=%s, rnd=%s\n",
+ printf ("mpfr_cos failed for x=%s, rnd=%s\n",
xs, mpfr_print_rnd_mode (rnd_mode));
printf ("mpfr_cos gives cos(x)=");
mpfr_out_str(stdout, 10, 0, c, GMP_RNDN);
@@ -119,14 +119,14 @@ check_nans (void)
}
/* Compute ~Pi/2 to check */
- /* FIXME: Too slow!
+ /* FIXME: Too slow!
mpfr_set_prec (x, 20000);
mpfr_const_pi (x, GMP_RNDD); mpfr_div_2ui (x, x, 1, GMP_RNDN);
mpfr_set_prec (y, 24);
test_cos (y, x, GMP_RNDN);
if (mpfr_cmp_str (y, "0.111001010110100011000001E-20000", 2, GMP_RNDN))
{
- printf("Error computing cos(~Pi/2)\n");
+ printf("Error computing cos(~Pi/2)\n");
mpfr_dump (y);
exit (1);
} */
@@ -150,7 +150,7 @@ special_overflow (void)
test_cos (y, x, GMP_RNDZ);
set_emin (MPFR_EMIN_MIN);
set_emax (MPFR_EMAX_MAX);
-
+
mpfr_clear (x);
mpfr_clear (y);
}
diff --git a/tests/tcosh.c b/tests/tcosh.c
index d1ab9b0a1..01f5f6def 100644
--- a/tests/tcosh.c
+++ b/tests/tcosh.c
@@ -142,7 +142,7 @@ special_overflow (void)
set_emin (-125);
set_emax (128);
-
+
mpfr_init2 (x, 24);
mpfr_init2 (y, 24);
@@ -152,7 +152,7 @@ special_overflow (void)
{
printf("Special overflow error 1.\n");
mpfr_dump (y);
- exit (1);
+ exit (1);
}
mpfr_set_str_binary (x, "0.101100100000000000110100E8");
@@ -163,7 +163,7 @@ special_overflow (void)
mpfr_dump (y);
exit (1);
}
-
+
set_emin (MPFR_EMIN_MIN);
set_emax (MPFR_EMAX_MAX);
diff --git a/tests/tdiv.c b/tests/tdiv.c
index dafaa48cb..3646e3682 100644
--- a/tests/tdiv.c
+++ b/tests/tdiv.c
@@ -62,10 +62,10 @@ inex_cmp (int a, int b)
return (b == 0) ? 0 : 1;
else
return (b < 0) ? 0 : 1;
-}
+}
static void
-check4 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, int p,
+check4 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, int p,
const char *Qs)
{
mpfr_t q, n, d;
@@ -204,7 +204,7 @@ check_64(void)
{
printf("Error for tdiv for GMP_RNDU and p=64\nx=");
mpfr_print_binary(x);
- printf("\ny=");
+ printf("\ny=");
mpfr_print_binary(y);
printf("\ngot ");
mpfr_print_binary(z);
@@ -750,12 +750,12 @@ main (int argc, char *argv[])
check_convergence();
check_64();
- check4("4.0","4.503599627370496e15", GMP_RNDZ, 62,
+ check4("4.0","4.503599627370496e15", GMP_RNDZ, 62,
"0.10000000000000000000000000000000000000000000000000000000000000E-49");
- check4("1.0","2.10263340267725788209e+187", GMP_RNDU, 65,
+ check4("1.0","2.10263340267725788209e+187", GMP_RNDU, 65,
"0.11010011111001101011111001100111110100000001101001111100111000000E-622");
check4("2.44394909079968374564e-150", "2.10263340267725788209e+187",GMP_RNDU,
- 65,
+ 65,
"0.11010011111001101011111001100111110100000001101001111100111000000E-1119");
test_generic (2, 800, 50);
diff --git a/tests/teq.c b/tests/teq.c
index fcffd081a..c29c61d7c 100644
--- a/tests/teq.c
+++ b/tests/teq.c
@@ -176,7 +176,7 @@ special (void)
MPFR_ASSERTN(mpfr_eq (x, y, 2) == 0);
MPFR_ASSERTN(mpfr_eq (x, y, mp_bits_per_limb) == 0);
MPFR_ASSERTN(mpfr_eq (x, y, mp_bits_per_limb + 1) == 0);
-
+
mpfr_clear (x);
mpfr_clear (y);
mpfr_clear (z);
diff --git a/tests/terf.c b/tests/terf.c
index ac5ebc2af..a81f64c4b 100644
--- a/tests/terf.c
+++ b/tests/terf.c
@@ -325,7 +325,7 @@ special_erf (void)
printf ("Error: erf for prec=43,64 (13)\n");
exit (1);
}
-
+
mpfr_clear (x);
mpfr_clear (y);
@@ -385,10 +385,10 @@ main (int argc, char *argv[])
{
tests_start_mpfr ();
- special_erf ();
- special_erfc ();
+ special_erf ();
+ special_erfc ();
- test_generic_erf (2, 100, 15);
+ test_generic_erf (2, 100, 15);
test_generic_erfc (2, 100, 15);
tests_end_mpfr ();
diff --git a/tests/tests.c b/tests/tests.c
index 158e544f3..63a392923 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -53,7 +53,7 @@ static void tests_rand_start (void);
static void tests_rand_end (void);
/* We want to always import the function mpfr_dump inside the test
- suite, so that we can use it in GDB. But it doesn't work if we build
+ suite, so that we can use it in GDB. But it doesn't work if we build
a Windows DLL (initializer element is not a constant) */
#if !__GMP_LIBGMP_DLL
extern void (*dummy_func) (mpfr_srcptr);
diff --git a/tests/texceptions.c b/tests/texceptions.c
index f100f47dd..bc549220d 100644
--- a/tests/texceptions.c
+++ b/tests/texceptions.c
@@ -77,7 +77,7 @@ check_emin_emax (void)
if ((mpfr_get_emax)() != MPFR_EMAX_MAX)
ERROR("get_emax FAILED!");
if ((mpfr_set_emax)(MPFR_EMAX_MAX+1) == 0)
- ERROR("set_emax failed! (2)");
+ ERROR("set_emax failed! (2)");
if ((mpfr_get_emin_min) () != MPFR_EMIN_MIN)
ERROR ("get_emin_min");
@@ -162,7 +162,7 @@ check_flags (void)
(mpfr_clear_erangeflag) ();
mpfr_set_ui (x, 1, GMP_RNDN);
- mpfr_mul_2exp (x, x, 1024, GMP_RNDN);
+ mpfr_mul_2exp (x, x, 1024, GMP_RNDN);
mpfr_get_ui (x, GMP_RNDN);
if (!(mpfr_erangeflag_p)())
ERROR ("ERROR: No erange flag!\n");
@@ -259,7 +259,7 @@ test_set_overflow (void)
static void
check_set () {
mpfr_clear_flags ();
-
+
mpfr_set_overflow ();
MPFR_ASSERTN ((mpfr_overflow_p) ());
mpfr_set_underflow ();
diff --git a/tests/texp.c b/tests/texp.c
index 5c567235d..d398ca2ad 100644
--- a/tests/texp.c
+++ b/tests/texp.c
@@ -244,11 +244,11 @@ check_special ()
mpfr_set_prec (x, 64);
mpfr_set_emax (MPFR_EMAX_DEFAULT);
mpfr_set_emin (MPFR_EMIN_DEFAULT);
- mpfr_set_str (x,
+ mpfr_set_str (x,
"0.1011000101110010000101111111010100001100000001110001100111001101E30",
2, GMP_RNDN);
mpfr_exp (x, x, GMP_RNDD);
- if (mpfr_cmp_str (x,
+ if (mpfr_cmp_str (x,
".1111111111111111111111111111111111111111111111111111111111111111E1073741823",
2, GMP_RNDN) != 0)
{
@@ -280,7 +280,7 @@ check_special ()
/* Check overflow. Corner case of mpfr_exp_3 */
if (MPFR_PREC_MAX > MPFR_EXP_THRESHOLD+10) {
mpfr_set_prec (x, MPFR_EXP_THRESHOLD+10);
- mpfr_set_str (x,
+ mpfr_set_str (x,
"0.1011000101110010000101111111010100001100000001110001100111001101E30",
2, GMP_RNDN);
mpfr_clear_overflow ();
diff --git a/tests/tfits.c b/tests/tfits.c
index b73c15ab3..1caadfdb7 100644
--- a/tests/tfits.c
+++ b/tests/tfits.c
@@ -207,7 +207,7 @@ static void check_intmax (void)
mpfr_t x;
mpfr_init2 (x, sizeof(uintmax_t)*CHAR_BIT);
-
+
/* Check NAN */
mpfr_set_nan(x);
if (mpfr_fits_uintmax_p(x, GMP_RNDN))
@@ -221,7 +221,7 @@ static void check_intmax (void)
ERROR1;
if (mpfr_fits_intmax_p(x, GMP_RNDN))
ERROR1;
-
+
/* Check Zero */
MPFR_SET_ZERO(x);
if (!mpfr_fits_uintmax_p(x, GMP_RNDN))
diff --git a/tests/tfma.c b/tests/tfma.c
index 261349816..0a96d9415 100644
--- a/tests/tfma.c
+++ b/tests/tfma.c
@@ -234,7 +234,7 @@ main (int argc, char *argv[])
mp_prec_t p0=2, p1=200;
unsigned int N=200;
-
+
mpfr_init (t);
mpfr_init (slong);
diff --git a/tests/tgamma.c b/tests/tgamma.c
index 0e0c75c43..f246773d6 100644
--- a/tests/tgamma.c
+++ b/tests/tgamma.c
@@ -37,7 +37,7 @@ special (void)
mpfr_init (x);
mpfr_init (y);
-
+
mpfr_set_nan (x);
mpfr_gamma (y, x, GMP_RNDN);
if (!mpfr_nan_p (y))
@@ -45,7 +45,7 @@ special (void)
printf ("Error for gamma(NaN)\n");
exit (1);
}
-
+
mpfr_set_inf (x, -1);
mpfr_gamma (y, x, GMP_RNDN);
if (!mpfr_nan_p (y))
@@ -53,7 +53,7 @@ special (void)
printf ("Error for gamma(-Inf)\n");
exit (1);
}
-
+
mpfr_set_inf (x, 1);
mpfr_gamma (y, x, GMP_RNDN);
if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
diff --git a/tests/tgeneric.c b/tests/tgeneric.c
index 8d4015b5e..c6d3a9164 100644
--- a/tests/tgeneric.c
+++ b/tests/tgeneric.c
@@ -129,7 +129,7 @@ test_generic (mp_prec_t p0, mp_prec_t p1, unsigned int N)
mpfr_clear (t);
#ifdef TWO_ARGS
mpfr_clear (u);
-#endif
+#endif
}
#undef RAND_FUNCTION
diff --git a/tests/tgeneric_ui.c b/tests/tgeneric_ui.c
index 3a40a35cf..57ba3a045 100644
--- a/tests/tgeneric_ui.c
+++ b/tests/tgeneric_ui.c
@@ -69,7 +69,7 @@ test_generic_ui (mp_prec_t p0, mp_prec_t p1, unsigned int N)
printf ("results differ for x=");
mpfr_out_str (stdout, 2, prec, x, GMP_RNDN);
printf ("\nu=%lu", (unsigned long) u);
- printf (" prec=%lu rnd_mode=%s\n",
+ printf (" prec=%lu rnd_mode=%s\n",
(unsigned long ) prec, mpfr_print_rnd_mode (rnd));
#ifdef TEST_FUNCTION_NAME
printf ("Function: %s\n", TEST_FUNCTION_NAME);
diff --git a/tests/tget_sj.c b/tests/tget_sj.c
index 609c22cd1..196cc4b1c 100644
--- a/tests/tget_sj.c
+++ b/tests/tget_sj.c
@@ -142,8 +142,8 @@ check_erange (void)
intmax_t d;
/* Test for ERANGE flag + correct behaviour if overflow */
-
- mpfr_init2 (x, 256);
+
+ mpfr_init2 (x, 256);
mpfr_set_uj (x, UINTMAX_MAX, GMP_RNDN);
mpfr_clear_erangeflag ();
dl = mpfr_get_uj (x, GMP_RNDN);
@@ -197,7 +197,7 @@ check_erange (void)
printf ("ERROR for get_sj + ERANGE + INTMAX_MIN (2)\n");
exit (1);
}
-
+
mpfr_clear (x);
}
diff --git a/tests/tget_str.c b/tests/tget_str.c
index e2f35b0f8..90c95b31d 100644
--- a/tests/tget_str.c
+++ b/tests/tget_str.c
@@ -66,7 +66,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
/* check n_digits=0 */
mpfr_set_prec (x, 5);
mpfr_set_ui (x, 17, GMP_RNDN);
@@ -74,7 +74,7 @@ check_small (void)
mpfr_free_str (s);
s = mpfr_get_str (NULL, &e, 36, 0, x, GMP_RNDN);
mpfr_free_str (s);
-
+
mpfr_set_prec (x, 64);
mpfr_set_si (x, -1, GMP_RNDN);
mpfr_div_2exp (x, x, 63, GMP_RNDN); /* x = -2^(-63) */
@@ -96,7 +96,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
/* check corner case ret!=0, j0!=0 in mpfr_get_str_aux */
mpfr_set_prec (x, 100);
mpfr_set_str_binary (x, "0.1001011111010001101110010101010101111001010111111101101101100110100011110110000101110110001011110000E-9");
@@ -108,7 +108,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
/* check corner case exact=0 in mpfr_get_str_aux */
mpfr_set_prec (x, 100);
mpfr_set_str_binary (x, "0.1001001111101101111000101000110111111010101100000110010001111111011001101011101100001100110000000000E8");
@@ -120,7 +120,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
for (p=4; p<=200; p++)
{
mpfr_set_prec (x, p);
@@ -134,7 +134,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
mpfr_nexttoinf (x);
s = mpfr_get_str (NULL, &e, 6, 2, x, GMP_RNDN);
if (strcmp (s, "11") || (e != 2))
@@ -407,7 +407,7 @@ check_small (void)
exit (1);
}
mpfr_free_str (s);
-
+
mpfr_set_str_binary (x, "11111001010011100101000001111111110001001001110110001E-136");
s = mpfr_get_str (NULL, &e, 10, 9, x, GMP_RNDN);
if (strcmp (s, "100693858") || e != -24)
@@ -415,7 +415,7 @@ check_small (void)
printf ("Error in mpfr_get_str (27): s=%s e=%d\n", s, (int) e);
exit (1);
}
- mpfr_free_str (s);
+ mpfr_free_str (s);
mpfr_set_str_binary (x, "10001000001110010110001011111011111011011010000110001E-110");
s = mpfr_get_str (NULL, &e, 10, 14, x, GMP_RNDN);
if (strcmp (s, "36923634350619") || e != -17)
diff --git a/tests/tget_z.c b/tests/tget_z.c
index f143e916e..d76e05926 100644
--- a/tests/tget_z.c
+++ b/tests/tget_z.c
@@ -59,8 +59,8 @@ check_one (mpz_ptr z)
for (neg = 0; neg <= 1; neg++)
{
mpz_neg (z, z);
- mpfr_set_z (f, z, GMP_RNDN);
-
+ mpfr_set_z (f, z, GMP_RNDN);
+
if (sh < 0)
{
mpz_tdiv_q_2exp (z, z, -sh);
@@ -72,7 +72,7 @@ check_one (mpz_ptr z)
mpfr_mul_2exp (f, f, sh, GMP_RNDN);
}
- mpfr_get_z (got, f, GMP_RNDZ);
+ mpfr_get_z (got, f, GMP_RNDZ);
if (mpz_cmp (got, z) != 0)
{
diff --git a/tests/tgmpop.c b/tests/tgmpop.c
index 5af53ddc7..d2538fa2e 100644
--- a/tests/tgmpop.c
+++ b/tests/tgmpop.c
@@ -145,14 +145,14 @@ check_for_zero ()
MPFR_SET_ZERO (x);
for(r = 0 ; r < GMP_RND_MAX ; r++)
{
- for (i = MPFR_SIGN_NEG ; i <= MPFR_SIGN_POS ;
+ for (i = MPFR_SIGN_NEG ; i <= MPFR_SIGN_POS ;
i+=MPFR_SIGN_POS-MPFR_SIGN_NEG)
{
MPFR_SET_SIGN(x, i);
mpfr_add_z (x, x, z, (mp_rnd_t) r);
if (!MPFR_IS_ZERO(x) || MPFR_SIGN(x)!=i)
{
- printf("GMP Zero errors for add_z & rnd=%s & s=%d\n",
+ printf("GMP Zero errors for add_z & rnd=%s & s=%d\n",
mpfr_print_rnd_mode ((mp_rnd_t) r), i);
mpfr_dump (x);
exit (1);
@@ -426,7 +426,7 @@ test_genericz (mp_prec_t p0, mp_prec_t p1, unsigned int N,
"arg1=",
(unsigned) prec, mpfr_print_rnd_mode (rnd), op);
mpfr_print_binary (arg1);
- printf("\narg2=");
+ printf("\narg2=");
mpz_out_str (stdout, 2, arg2);
printf ("\ngot ");
mpfr_dump (dst_small);
@@ -448,12 +448,12 @@ test_genericz (mp_prec_t p0, mp_prec_t p1, unsigned int N,
((inexact < 0) && (compare >= 0)))
{
printf ("Wrong inexact flag for rnd=%s and %s_z:\n"
- "expected %d, got %d\n",
+ "expected %d, got %d\n",
mpfr_print_rnd_mode (rnd), op, compare, inexact);
printf ("\narg1="); mpfr_print_binary (arg1);
printf ("\narg2="); mpz_out_str(stdout, 2, arg2);
- printf ("\ndstl="); mpfr_print_binary (dst_big);
- printf ("\ndsts="); mpfr_print_binary (dst_small);
+ printf ("\ndstl="); mpfr_print_binary (dst_big);
+ printf ("\ndsts="); mpfr_print_binary (dst_small);
printf ("\ntmp ="); mpfr_dump (tmp);
exit (1);
}
@@ -527,7 +527,7 @@ test_genericq (mp_prec_t p0, mp_prec_t p1, unsigned int N,
((inexact < 0) && (compare >= 0)))
{
printf ("Wrong inexact flag for rnd=%s and %s_q:\n"
- "expected %d, got %d",
+ "expected %d, got %d",
mpfr_print_rnd_mode (rnd), op, compare, inexact);
printf ("\narg1="); mpfr_print_binary (arg1);
printf ("\narg2="); mpq_out_str(stdout, 2, arg2);
diff --git a/tests/tinp_str.c b/tests/tinp_str.c
index ef25bd262..dab6ee25f 100644
--- a/tests/tinp_str.c
+++ b/tests/tinp_str.c
@@ -65,7 +65,7 @@ main (int argc, char *argv[])
exit (1);
}
fclose (f);
-
+
mpfr_clear (x);
tests_end_mpfr ();
diff --git a/tests/tlog.c b/tests/tlog.c
index 6990d5a49..72d04676d 100644
--- a/tests/tlog.c
+++ b/tests/tlog.c
@@ -58,7 +58,7 @@ check2 (const char *as, mp_rnd_t rnd_mode, const char *res1s)
if (mpfr_cmp_str1 (tres, res1s))
{
- printf ("mpfr_log failed for a=%s, rnd_mode=%s\n",
+ printf ("mpfr_log failed for a=%s, rnd_mode=%s\n",
as, mpfr_print_rnd_mode (rnd_mode));
printf ("correct result is %s\n mpfr_log gives ",
res1s);
@@ -245,7 +245,7 @@ main (int argc, char *argv[])
check2("8.0",GMP_RNDZ,"2.07944154167983574765e+00");
check2("44.0",GMP_RNDU,"3.78418963391826146392e+00");
check2("1.01979300812244555452", GMP_RNDN, "1.95996734891603664741e-02");
-
+
/* bugs found by Vincent Lefe`vre */
check2("0.99999599881598921769", GMP_RNDN, "-0.0000040011920155404072924737977900999652547398000024259090423583984375");
check2("9.99995576063808955247e-01",GMP_RNDZ,"-4.42394597667932383816e-06");
@@ -256,17 +256,17 @@ main (int argc, char *argv[])
check2("9.99985901426543311032e-01",GMP_RNDN,"-1.40986728425098585229e-05");
check2("9.99986053947420794330e-01",GMP_RNDN, "-0.000013946149826301084938555592540598837558718514628708362579345703125");
check2("9.99971938247442126979e-01",GMP_RNDN,"-2.80621462962173414790e-05");
-
+
/* other bugs found by Vincent Lefe`vre */
check2("1.18615436389927785905e+77",GMP_RNDN,"1.77469768607706015473e+02");
check2("9.48868723578399476187e+77",GMP_RNDZ,"1.79549152432275803903e+02");
check2("2.31822210096938820854e+89",GMP_RNDN,"2.05770873832573869322e+02");
-
+
/* further bugs found by Vincent Lefe`vre */
check2("9.99999989485669482647e-01",GMP_RNDZ,"-1.05143305726283042331e-08");
check2("9.99999989237970177136e-01",GMP_RNDZ,"-1.07620298807745377934e-08");
check2("9.99999989239339082125e-01",GMP_RNDN,"-1.07606609757704445430e-08");
-
+
check2("7.3890560989306504",GMP_RNDU,"2.0000000000000004"); /* exp(2.0) */
check2("7.3890560989306495",GMP_RNDU,"2.0"); /* exp(2.0) */
check2("7.53428236571286402512e+34",GMP_RNDZ,"8.03073567492226345621e+01");
@@ -297,7 +297,7 @@ main (int argc, char *argv[])
check2("6.09969788341579732815e+00",GMP_RNDD,"1.80823924264386204363e+00");
test_generic (2, 100, 40);
-
+
done:
tests_end_mpfr ();
return 0;
diff --git a/tests/tlog10.c b/tests/tlog10.c
index 7ff4705d1..b93750043 100644
--- a/tests/tlog10.c
+++ b/tests/tlog10.c
@@ -87,7 +87,7 @@ main (int argc, char *argv[])
mpfr_set_ui (x, 1, GMP_RNDN);
test_log10 (y, x, GMP_RNDN);
MPFR_ASSERTN((mpfr_cmp_ui (y, 0) == 0) && (MPFR_IS_POS (y)));
-
+
/* check log10(10^n)=n */
mpfr_set_ui (x, 1, GMP_RNDN);
for (n = 1; n <= 15; n++)
diff --git a/tests/tlog1p.c b/tests/tlog1p.c
index 8fee11477..54ea27ee4 100644
--- a/tests/tlog1p.c
+++ b/tests/tlog1p.c
@@ -57,7 +57,7 @@ special (void)
mpfr_t x;
mpfr_init (x);
-
+
mpfr_set_nan (x);
test_log1p (x, x, GMP_RNDN);
MPFR_ASSERTN(mpfr_nan_p (x));
diff --git a/tests/tlog2.c b/tests/tlog2.c
index d3665d082..718cd20e4 100644
--- a/tests/tlog2.c
+++ b/tests/tlog2.c
@@ -34,7 +34,7 @@ special (void)
mpfr_t x;
mpfr_init (x);
-
+
mpfr_set_nan (x);
mpfr_log2 (x, x, GMP_RNDN);
MPFR_ASSERTN(mpfr_nan_p (x));
diff --git a/tests/tminmax.c b/tests/tminmax.c
index 6d81ec164..392fc7bc1 100644
--- a/tests/tminmax.c
+++ b/tests/tminmax.c
@@ -78,7 +78,7 @@ main (void)
exit (1);
}
/* Case x=0+ and x=0- */
- mpfr_set_ui (x, 0, GMP_RNDN);
+ mpfr_set_ui (x, 0, GMP_RNDN);
mpfr_set_ui (y, 0, GMP_RNDN); MPFR_SET_NEG(y);
mpfr_max (z, x, y, GMP_RNDN);
if (!MPFR_IS_ZERO(z) || MPFR_IS_NEG(z))
diff --git a/tests/tmul.c b/tests/tmul.c
index 3203bbafc..ac289f79c 100644
--- a/tests/tmul.c
+++ b/tests/tmul.c
@@ -140,7 +140,7 @@ check24 (const char *xs, const char *ys, mp_rnd_t rnd_mode, const char *zs)
mpfr_clears(xx, yy, zz, NULL);
}
-/* the following examples come from the paper "Number-theoretic Test
+/* the following examples come from the paper "Number-theoretic Test
Generation for Directed Rounding" from Michael Parks, Table 1 */
static void
check_float (void)
@@ -332,7 +332,7 @@ check_max(void)
/* exact result is 0.1E-1, which should round to 0 */
MPFR_ASSERTN(mpfr_cmp_ui (zz, 0) == 0 && MPFR_IS_POS(zz));
set_emin (emin);
-
+
/* coverage test for mpfr_powerof2_raw */
emin = mpfr_get_emin ();
set_emin (0);
@@ -344,7 +344,7 @@ check_max(void)
/* exact result is just above 0.1E-1, which should round to minfloat */
MPFR_ASSERTN(mpfr_cmp (zz, yy) == 0);
set_emin (emin);
-
+
mpfr_clear(xx);
mpfr_clear(yy);
mpfr_clear(zz);
@@ -447,8 +447,8 @@ check_regression (void)
int i;
mpfr_inits2 (6177, x, y, z, NULL);
-
- mpfr_set_str (y,
+
+ mpfr_set_str (y,
"5.17cc1b727220a94fe13abe8fa9a6ee06db14acc9e21c820ff28b1d5ef5de2b0db92371d212"
"6e9700324977504e8c90e7f0ef58e5894d39f74411afa975da24274ce38135a2fbf209cc8eb1"
"cc1a99cfa4e422fc5defc941d8ffc4bffef02cc07f79788c5ad05368fb69b3f6793e584dba7a"
@@ -493,7 +493,7 @@ check_regression (void)
"ffa35db8f011a010fa3d98fd2183b84afcb56c2dd1d35b9a53e479b6f84565d28e49bc4bfb97"
"90e1ddf2daa4cb7e3362fb1342", 16, GMP_RNDN);
i = mpfr_mul (x, y, z, GMP_RNDN);
- if (mpfr_cmp_str (x,
+ if (mpfr_cmp_str (x,
"f.fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
@@ -580,14 +580,14 @@ check_regression (void)
printf ("\n");
exit (1);
}
-
+
mpfr_set_prec (x, 50);
mpfr_set_prec (y, 40);
mpfr_set_prec (z, 53);
mpfr_set_str (y, "4.1ffffffff8", 16, GMP_RNDN);
mpfr_set_str (z, "4.2000000ffe0000@-4", 16, GMP_RNDN);
- i = mpfr_mul (x, y, z, GMP_RNDN);
+ i = mpfr_mul (x, y, z, GMP_RNDN);
if (mpfr_cmp_str (x, "1.104000041d6c0@-3", 16, GMP_RNDN) != 0
|| i <= 0)
{
@@ -655,8 +655,8 @@ main (int argc, char *argv[])
check53("0.0", "6.9314718055994530941514e-1", GMP_RNDZ, "0.0");
check_sign();
check53("-4.165000000e4", "-0.00004801920768307322868063274915", GMP_RNDN,
- "2.0");
- check53("2.71331408349172961467e-08", "-6.72658901114033715233e-165",
+ "2.0");
+ check53("2.71331408349172961467e-08", "-6.72658901114033715233e-165",
GMP_RNDZ, "-1.8251348697787782844e-172");
check53("0.31869277231188065", "0.88642843322303122", GMP_RNDZ,
"2.8249833483992453642e-1");
@@ -664,12 +664,12 @@ main (int argc, char *argv[])
28, 45, 2, "0.375");
check("2.63978122803639081440e-01", "6.8378615379333496093e-1", GMP_RNDN,
34, 23, 31, "0.180504585267044603");
- check("1.0", "0.11835170935876249132", GMP_RNDU, 6, 41, 36,
+ check("1.0", "0.11835170935876249132", GMP_RNDU, 6, 41, 36,
"0.1183517093595583");
check53("67108865.0", "134217729.0", GMP_RNDN, "9.007199456067584e15");
check("1.37399642157394197284e-01", "2.28877275604219221350e-01", GMP_RNDN,
49, 15, 32, "0.0314472340833162888");
- check("4.03160720978664954828e-01", "5.854828e-1"
+ check("4.03160720978664954828e-01", "5.854828e-1"
/*"5.85483042917246621073e-01"*/, GMP_RNDZ,
51, 22, 32, "0.2360436821472831");
check("3.90798504668055102229e-14", "9.85394674650308388664e-04", GMP_RNDN,
diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c
index f5d88789d..b862f99bc 100644
--- a/tests/tmul_ui.c
+++ b/tests/tmul_ui.c
@@ -152,7 +152,7 @@ main (int argc, char *argv[])
MPFR_ASSERTN(mpfr_inf_p (x) && MPFR_IS_POS(x));
set_emax (emax);
- mpfr_set_str (x, /*1.0/3.0*/
+ mpfr_set_str (x, /*1.0/3.0*/
"0.333333333333333333333333333333333", 10, GMP_RNDZ);
mpfr_mul_ui (x, x, 3, GMP_RNDU);
if (mpfr_cmp_ui (x, 1))
diff --git a/tests/tout_str.c b/tests/tout_str.c
index 780733400..b799e48e0 100644
--- a/tests/tout_str.c
+++ b/tests/tout_str.c
@@ -120,7 +120,7 @@ special (void)
mpfr_out_str (fout, 10, 0, x, GMP_RNDN);
mpfr_neg (x, x, GMP_RNDN);
mpfr_out_str (fout, 10, 0, x, GMP_RNDN);
-
+
mpfr_clear (x);
}
diff --git a/tests/toutimpl.c b/tests/toutimpl.c
index 486e18c39..62861d4c0 100644
--- a/tests/toutimpl.c
+++ b/tests/toutimpl.c
@@ -30,7 +30,7 @@ MA 02110-1301, USA. */
We can't use tmpname since it is insecure */
#define FILE_NAME "dummy.tmp"
-static const char Buffer[] =
+static const char Buffer[] =
"@NaN@\n"
"-@Inf@\n"
"-0\n"
@@ -72,7 +72,7 @@ int main()
exit (1);
}
- /* Reopen stdout to a file. All errors will be put to stderr
+ /* Reopen stdout to a file. All errors will be put to stderr
Can't use tmpname since it is unsecure */
if (freopen (FILE_NAME, "w", stdout) == NULL)
{
@@ -89,7 +89,7 @@ int main()
mpfr_set_str_binary (x, "0.101010101010111110010001100011000100001E32");
mpfr_dump (x);
mpfr_print_mant_binary ("x=",MPFR_MANT(x), MPFR_PREC(x));
-
+
mpfr_clear (x);
fclose (stdout);
@@ -112,7 +112,7 @@ int main()
fprintf (stderr, "Character mismatch for i=%d / %lu\n",
i, (unsigned long) sizeof(Buffer));
exit (1);
- }
+ }
}
fclose (f);
diff --git a/tests/tpow_z.c b/tests/tpow_z.c
index de6811aee..3c31de58c 100644
--- a/tests/tpow_z.c
+++ b/tests/tpow_z.c
@@ -160,8 +160,8 @@ static void check_integer (mp_prec_t begin, mp_prec_t end, unsigned long max) {
/* printf ("Check pow_z\n"); */
res2 = mpfr_pow_z (y2, x, z, rnd);
if (mpfr_cmp (y1, y2) != 0) {
- printf ("Error for p=%lu, z=%ld, rnd=%s and x=", p, n,
- mpfr_print_rnd_mode (rnd));
+ printf ("Error for p=%lu, z=%ld, rnd=%s and x=", p, n,
+ mpfr_print_rnd_mode (rnd));
mpfr_dump (x);
printf ("Ypowui="); mpfr_dump (y1);
printf ("Ypowz ="); mpfr_dump (y2);
@@ -182,7 +182,7 @@ static void check_integer (mp_prec_t begin, mp_prec_t end, unsigned long max) {
mpz_clear (z);
}
-static void check_regression (void)
+static void check_regression (void)
{
mpfr_t x, y;
mpz_t z;
@@ -200,7 +200,7 @@ static void check_regression (void)
printf ("Regression (1) tested failed (%d=?%d)\n",res1, res2);
printf ("pow_ui: "); mpfr_dump (x);
printf ("pow_z: "); mpfr_dump (y);
-
+
exit (1);
}
@@ -212,7 +212,7 @@ static void check_regression (void)
int main () {
MPFR_TEST_USE_RANDS ();
tests_start_mpfr ();
-
+
check_special ();
check_integer (2, 163, 100);
check_regression ();
diff --git a/tests/trandom.c b/tests/trandom.c
index d0092c0fc..6e249e72d 100644
--- a/tests/trandom.c
+++ b/tests/trandom.c
@@ -28,14 +28,14 @@ MA 02110-1301, USA. */
static void
test_random (long nbtests, mp_prec_t prec, int verbose)
{
- mpfr_t x;
- int *tab, size_tab, k;
- double d, av = 0, var = 0, chi2 = 0, th;
+ mpfr_t x;
+ int *tab, size_tab, k;
+ double d, av = 0, var = 0, chi2 = 0, th;
- mpfr_init2(x, prec);
+ mpfr_init2(x, prec);
- size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
- tab = (int *) malloc (size_tab * sizeof(int));
+ size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
+ tab = (int *) malloc (size_tab * sizeof(int));
for (k = 0; k < size_tab; ++k)
tab[k] = 0;
@@ -53,14 +53,14 @@ test_random (long nbtests, mp_prec_t prec, int verbose)
return;
}
- av /= nbtests;
- var = (var /nbtests) - av*av;
+ av /= nbtests;
+ var = (var /nbtests) - av*av;
th = (double) nbtests / size_tab;
-
- printf("Average = %.5f\nVariance = %.5f\n", av, var);
- printf("Repartition for random. Each integer should be close to %d.\n",
- (int)th);
+
+ printf("Average = %.5f\nVariance = %.5f\n", av, var);
+ printf("Repartition for random. Each integer should be close to %d.\n",
+ (int)th);
for (k = 0; k < size_tab; k++)
{
@@ -90,8 +90,8 @@ test_random2 (long nbtests, mp_prec_t prec, int verbose)
xn = 1 + (prec - 1) / mp_bits_per_limb;
sh = xn * mp_bits_per_limb - prec;
- size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
- tab = (int *) malloc (size_tab * sizeof(int));
+ size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
+ tab = (int *) malloc (size_tab * sizeof(int));
for (k = 0; k < size_tab; ++k)
tab[k] = 0;
@@ -132,7 +132,7 @@ test_random2 (long nbtests, mp_prec_t prec, int verbose)
free(tab);
return;
}
-
+
av /= nbtests;
var = (var /nbtests) - av*av;
@@ -158,9 +158,9 @@ test_random2 (long nbtests, mp_prec_t prec, int verbose)
static void
test_urandomb (long nbtests, mp_prec_t prec, int verbose)
{
- mpfr_t x;
+ mpfr_t x;
int *tab, size_tab, k, sh, xn;
- gmp_randstate_t state;
+ gmp_randstate_t state;
double d, av = 0, var = 0, chi2 = 0, th;
mp_exp_t emin;
@@ -168,8 +168,8 @@ test_urandomb (long nbtests, mp_prec_t prec, int verbose)
xn = 1 + (prec - 1) / mp_bits_per_limb;
sh = xn * mp_bits_per_limb - prec;
- size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
- tab = (int *) malloc (size_tab * sizeof(int));
+ size_tab = (nbtests >= 1000 ? nbtests / 50 : 20);
+ tab = (int *) malloc (size_tab * sizeof(int));
for (k = 0; k < size_tab; ++k)
tab[k] = 0;
@@ -238,9 +238,9 @@ int
main (int argc, char *argv[])
{
long nbtests;
- mp_prec_t prec;
- int verbose = 0;
-
+ mp_prec_t prec;
+ int verbose = 0;
+
MPFR_TEST_USE_RANDS ();
tests_start_mpfr ();
@@ -261,7 +261,7 @@ main (int argc, char *argv[])
prec = atol(argv[2]);
test_random (nbtests, prec, verbose);
- test_random2 (nbtests, prec, verbose);
+ test_random2 (nbtests, prec, verbose);
test_urandomb (nbtests, prec, verbose);
if (argc == 1) /* check also small precision */
diff --git a/tests/trint.c b/tests/trint.c
index b23481a61..d6d2de2ea 100644
--- a/tests/trint.c
+++ b/tests/trint.c
@@ -136,7 +136,7 @@ special (void)
/* Bug found by Mark J Watkins */
mpfr_set_prec (x, 84);
- mpfr_set_str_binary (x,
+ mpfr_set_str_binary (x,
"0.110011010010001000000111101101001111111100101110010000000000000" \
"000000000000000000000E32");
mpfr_round (x, x);
@@ -192,7 +192,7 @@ test_against_libc (void)
#if HAVE_ROUND
TEST_FCT (round);
-#endif
+#endif
#if HAVE_TRUNC
TEST_FCT (trunc);
#endif
diff --git a/tests/tset_si.c b/tests/tset_si.c
index 5c2625e31..4e1935cb9 100644
--- a/tests/tset_si.c
+++ b/tests/tset_si.c
@@ -35,7 +35,7 @@ test_2exp (void)
int res;
mpfr_init2 (x, 32);
-
+
mpfr_set_ui_2exp (x, 1, 0, GMP_RNDN);
if (mpfr_cmp_ui(x, 1))
ERROR("(1U,0)");
@@ -183,7 +183,7 @@ main (int argc, char *argv[])
mpfr_set_ui (x, 0, (mp_rnd_t) r);
if (MPFR_IS_NEG (x) || mpfr_get_ui (x, (mp_rnd_t) r) != 0)
{
- printf ("mpfr_set_ui (x, 0) gives -0 for %s\n",
+ printf ("mpfr_set_ui (x, 0) gives -0 for %s\n",
mpfr_print_rnd_mode ((mp_rnd_t) r));
exit (1);
}
@@ -197,7 +197,7 @@ main (int argc, char *argv[])
exit (1);
}
}
-
+
/* check potential bug in case mp_limb_t is unsigned */
emax = mpfr_get_emax ();
set_emax (0);
@@ -266,7 +266,7 @@ main (int argc, char *argv[])
MPFR_ASSERTN (mpfr_get_si (x, GMP_RNDD) == 0);
/* Test for ERANGE flag + correct behaviour if overflow */
- mpfr_set_prec (x, 256);
+ mpfr_set_prec (x, 256);
mpfr_set_ui (x, ULONG_MAX, GMP_RNDN);
mpfr_clear_erangeflag ();
dl = mpfr_get_ui (x, GMP_RNDN);
@@ -320,7 +320,7 @@ main (int argc, char *argv[])
printf ("ERROR for get_si + ERANGE + LONG_MIN (2)\n");
exit (1);
}
-
+
mpfr_clear (x);
test_2exp ();
diff --git a/tests/tset_sj.c b/tests/tset_sj.c
index 621441704..494178598 100644
--- a/tests/tset_sj.c
+++ b/tests/tset_sj.c
@@ -1,4 +1,4 @@
-/* Test file for
+/* Test file for
mpfr_set_sj, mpfr_set_uj, mpfr_set_sj_2exp and mpfr_set_uj_2exp.
Copyright 2004 Free Software Foundation, Inc.
@@ -50,7 +50,7 @@ int main() { return 0; }
#define ERROR(str) {printf("Error for "str"\n"); exit(1);}
-static int
+static int
inexact_sign (int x)
{
return (x < 0) ? -1 : (x > 0);
@@ -78,7 +78,7 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N)
inex2 = mpfr_set_ui (y, limb, GMP_RNDN);
if (mpfr_cmp (x, y))
{
- printf ("ERROR for mpfr_set_uj and j=%lu and p=%lu\n",
+ printf ("ERROR for mpfr_set_uj and j=%lu and p=%lu\n",
(unsigned long) limb, p);
printf ("X="); mpfr_dump (x);
printf ("Y="); mpfr_dump (y);
@@ -88,7 +88,7 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N)
{
printf ("ERROR for inexact(set_uj): j=%lu p=%lu\n"
"Inexact1= %d Inexact2= %d\n",
- (unsigned long) limb, p, inex1, inex2);
+ (unsigned long) limb, p, inex1, inex2);
exit (1);
}
}
@@ -116,7 +116,7 @@ check_set_uj_2exp (void)
int inex;
mpfr_init2 (x, sizeof(uintmax_t)*CHAR_BIT);
-
+
inex = mpfr_set_uj_2exp (x, 1, 0, GMP_RNDN);
if (inex || mpfr_cmp_ui(x, 1))
ERROR("(1U,0)");
@@ -135,7 +135,7 @@ check_set_uj_2exp (void)
if (inex || !mpfr_powerof2_raw (x)
|| MPFR_EXP (x) != (sizeof(uintmax_t)*CHAR_BIT+1) )
ERROR("(UINTMAX_MAX)");
-
+
inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, MPFR_EMAX_MAX-10, GMP_RNDN);
if (inex == 0 || !mpfr_inf_p (x))
ERROR ("Overflow");
@@ -154,13 +154,13 @@ check_set_sj ()
int inex;
mpfr_init2 (x, sizeof(intmax_t)*CHAR_BIT-1);
-
+
inex = mpfr_set_sj (x, -INTMAX_MAX, GMP_RNDN);
inex |= mpfr_add_si (x, x, -1, GMP_RNDN);
if (inex || mpfr_sgn (x) >=0 || !mpfr_powerof2_raw (x)
|| MPFR_EXP (x) != (sizeof(intmax_t)*CHAR_BIT) )
ERROR("set_sj (-INTMAX_MAX)");
-
+
inex = mpfr_set_sj (x, 1742, GMP_RNDN);
if (inex || mpfr_cmp_ui (x, 1742))
ERROR ("set_sj (1742)");
diff --git a/tests/tset_str.c b/tests/tset_str.c
index c563084b8..169a4797d 100644
--- a/tests/tset_str.c
+++ b/tests/tset_str.c
@@ -44,7 +44,7 @@ MA 02110-1301, USA. */
exit (1); \
}
-static void
+static void
check_underflow (void)
{
mpfr_t a;
@@ -656,7 +656,7 @@ main (int argc, char *argv[])
CHECK53(y, "5783893e-128", GMP_RNDU, x,
"0.10011000111100000110011110000101100111110011101110101E-402",
38);
-
+
CHECK53(y, "87575437e-310", GMP_RNDD, x,
"0.11000000001011100000110011110011010000000010001010110E-1003",
39);
@@ -827,7 +827,7 @@ main (int argc, char *argv[])
mpfr_set_prec (y, 135);
mpfr_set_str (y, "23833565676460972739462619524519814462546", 10, GMP_RNDN);
MPFR_ASSERTN (mpfr_cmp (x, y) == 0 && ret == 0);
-
+
/* coverage test for set_str_binary */
mpfr_set_str_binary (x, "NaN");
MPFR_ASSERTN(mpfr_nan_p (x));
diff --git a/tests/tset_z.c b/tests/tset_z.c
index 7c6b17d7a..e8d81f1b3 100644
--- a/tests/tset_z.c
+++ b/tests/tset_z.c
@@ -48,7 +48,7 @@ static void check0(void)
}
mpfr_clear(x);
mpz_clear(y);
-}
+}
/* FIXME: It'd be better to examine the actual data in an mpfr_t to see that
it's as expected. Comparing mpfr_set_z with mpfr_cmp or against
diff --git a/tests/tsi_op.c b/tests/tsi_op.c
index fdf15d895..0d28f721e 100644
--- a/tests/tsi_op.c
+++ b/tests/tsi_op.c
@@ -1,4 +1,4 @@
-/* Test file for mpfr_add_si, mpfr_sub_si, mpfr_si_sub, mpfr_mul_si,
+/* Test file for mpfr_add_si, mpfr_sub_si, mpfr_si_sub, mpfr_mul_si,
mpfr_div_si, mpfr_si_div
Copyright 2004 Free Software Foundation.
@@ -41,7 +41,7 @@ const struct {
const char * res_sub;
const char * res_mul;
const char * res_div;
-} tab[] = {
+} tab[] = {
{"10", 0x1, "11", "0F", "10", "10"},
{"1", -1, "0", "2", "-1", "-1"},
{"17.42", -0x17, "0.42", "2E.42", "-216.ee", "-1.02de9bd37a6f4"},
@@ -53,7 +53,7 @@ check_invert ()
{
mpfr_t x;
mpfr_init2 (x, MPFR_PREC_MIN);
-
+
mpfr_set_ui (x, 0xC, GMP_RNDN);
mpfr_si_sub (x, -1, x, GMP_RNDD); /* -0001 - 1100 = - 1101 --> -1 0000 */
if (mpfr_cmp_si (x, -0x10) )
diff --git a/tests/tsin.c b/tests/tsin.c
index 6919bc9f4..a5401a543 100644
--- a/tests/tsin.c
+++ b/tests/tsin.c
@@ -113,7 +113,7 @@ test_sign (void)
test_sin (y, x, GMP_RNDN);
mpfr_set_str_binary (x, "11011010111101011110111100010101010101110000000001011E-106");
MPFR_ASSERTN(mpfr_cmp (x, y) == 0);
-
+
/* Bug on Special cases */
mpfr_set_str_binary (x, "0.100011011010111101E-32");
test_sin (y, x, GMP_RNDN);
diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c
index 441f3d5ad..a8ceeafbe 100644
--- a/tests/tsin_cos.c
+++ b/tests/tsin_cos.c
@@ -35,7 +35,7 @@ large_test (int prec, int N)
mpfr_init2 (c, prec);
mpfr_set_ui (x, 3, GMP_RNDN);
mpfr_sqrt (x, x, GMP_RNDN);
- for (i=0; i<N; i++)
+ for (i=0; i<N; i++)
mpfr_sin_cos (s, c, x, GMP_RNDN);
mpfr_out_str (stdout, 10, 0, s, GMP_RNDN); puts ("");
mpfr_clear (x);
@@ -44,7 +44,7 @@ large_test (int prec, int N)
}
static void
-check53 (const char *xs, const char *sin_xs, const char *cos_xs,
+check53 (const char *xs, const char *sin_xs, const char *cos_xs,
mp_rnd_t rnd_mode)
{
mpfr_t xx, s, c;
@@ -178,7 +178,7 @@ main(int argc, char *argv[])
}
/* worst case from PhD thesis of Vincent Lefe`vre: x=8980155785351021/2^54 */
- check53 ("4.984987858808754279e-1", "4.781075595393330379e-1",
+ check53 ("4.984987858808754279e-1", "4.781075595393330379e-1",
"8.783012931285841817e-1", GMP_RNDN);
check53 ("4.984987858808754279e-1", "4.781075595393329824e-1",
"8.783012931285840707e-1", GMP_RNDD);
diff --git a/tests/tsqr.c b/tests/tsqr.c
index 103b8bced..dce8d4960 100644
--- a/tests/tsqr.c
+++ b/tests/tsqr.c
@@ -41,14 +41,14 @@ int main(void)
return 0;
}
-static int
+static int
inexact_sign (int x)
{
return (x < 0) ? -1 : (x > 0);
}
-static void
-error1 (mp_rnd_t rnd, mpfr_prec_t prec,
+static void
+error1 (mp_rnd_t rnd, mpfr_prec_t prec,
mpfr_t in, mpfr_t outmul, mpfr_t outsqr)
{
printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), prec);
@@ -59,7 +59,7 @@ error1 (mp_rnd_t rnd, mpfr_prec_t prec,
}
static void
-error2 (mp_rnd_t rnd, mpfr_prec_t prec, mpfr_t in, mpfr_t out,
+error2 (mp_rnd_t rnd, mpfr_prec_t prec, mpfr_t in, mpfr_t out,
int inexactmul, int inexactsqr)
{
printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), prec);
@@ -104,7 +104,7 @@ void check_special(void)
mpfr_set_nan (x);
mpfr_sqr (y, x, GMP_RNDN);
MPFR_ASSERTN (mpfr_nan_p (y));
-
+
mpfr_set_inf (x, 1);
mpfr_sqr (y, x, GMP_RNDN);
MPFR_ASSERTN (mpfr_inf_p (y) && mpfr_sgn (y) > 0);
diff --git a/tests/tsqrt.c b/tests/tsqrt.c
index b01898775..14a90f701 100644
--- a/tests/tsqrt.c
+++ b/tests/tsqrt.c
@@ -351,7 +351,7 @@ special (void)
MPFR_ASSERTN (mpfr_mul (x, x, x, GMP_RNDN) == 0); /* exact */
inexact = test_sqrt (z, x, GMP_RNDN);
/* even rule: z should be 2^(BITS_PER_MP_LIMB - 1) */
- MPFR_ASSERTN (inexact < 0);
+ MPFR_ASSERTN (inexact < 0);
MPFR_ASSERTN (mpfr_cmp_ui_2exp (z, 1, BITS_PER_MP_LIMB - 1) == 0);
mpfr_nextbelow (x);
/* now x is just below [2^(BITS_PER_MP_LIMB - 1) + 1]^2 */
@@ -520,7 +520,7 @@ test_property1 (mp_prec_t p, mp_rnd_t r)
printf ("got "); mpfr_dump (z);
exit (1);
}
-
+
mpfr_clear (x);
mpfr_clear (y);
mpfr_clear (z);
diff --git a/tests/tstrtofr.c b/tests/tstrtofr.c
index eca635dbe..fc915ea0e 100644
--- a/tests/tstrtofr.c
+++ b/tests/tstrtofr.c
@@ -37,7 +37,7 @@ int
main (int argc, char *argv[])
{
tests_start_mpfr ();
-
+
check_special();
check_reftable ();
check_parse ();
@@ -131,7 +131,7 @@ check_special (void)
mpfr_dump (x);
exit (1);
}
-
+
/* Check Zero */
res = mpfr_strtofr (x, " 00000", &s, 11, GMP_RNDN);
if (res != 0 || !mpfr_zero_p (x) || s[0] != 0)
@@ -147,7 +147,7 @@ check_special (void)
if (res != 0 || mpfr_cmp_ui (x, 10))
{
printf ("Error for setting 'A' in base 62\n x=");
- mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
putchar ('\n');
exit (1);
}
@@ -155,7 +155,7 @@ check_special (void)
if (res != 0 || mpfr_cmp_ui (x, 36))
{
printf ("Error for setting 'a' in base 62\n x=");
- mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
putchar ('\n');
exit (1);
}
@@ -163,7 +163,7 @@ check_special (void)
if (res != 0 || mpfr_cmp_ui (x, 35))
{
printf ("Error for setting 'Z' in base 62\n x=");
- mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
putchar ('\n');
exit (1);
}
@@ -171,7 +171,7 @@ check_special (void)
if (res != 0 || mpfr_cmp_ui (x, 61))
{
printf ("Error for setting 'z' in base 62\n x=");
- mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
putchar ('\n');
exit (1);
}
@@ -196,9 +196,9 @@ int main()
mpfr_t x;
mp_prec_t p;
mp_exp_t e;
-
+
mpfr_init (x);
- printf ("struct dymmy_test { \n"
+ printf ("struct dymmy_test { \n"
" mp_prec_t prec; \n"
" int base; \n"
" const char *str; \n"
@@ -223,12 +223,12 @@ int main()
}
#endif
-static struct dymmy_test {
- mp_prec_t prec;
- int base;
- const char *str;
- const char *binstr;
- } RefTable[] = {
+static struct dymmy_test {
+ mp_prec_t prec;
+ int base;
+ const char *str;
+ const char *binstr;
+ } RefTable[] = {
{39, 20,
"1.1c9jeh9jg12d8iiggf26b8ce2cig24agai51d9@1445",
"1.00111010111010001110110001101011101011e6245"},
@@ -528,7 +528,7 @@ static struct dymmy_test {
"1.01010010101011010111011e-13092"},
{88, 18,
"3.5ed0gad0bhhb7aa9ge2ad1dhcg6833f3e068936hghf23gd2aa69f13539f15hfce50aa64achfee49bfg7249g@-4058",
-"1.001000010110011011000101100000101111101001100011101101001111110111000010010110010001100e-16920"}
+"1.001000010110011011000101100000101111101001100011101101001111110111000010010110010001100e-16920"}
};
@@ -582,9 +582,9 @@ check_parse (void)
{
mpfr_t x;
char *s;
-
+
mpfr_init (x);
-
+
/* Check if it stops correctly */
mpfr_strtofr (x, "15*x", &s, 10, GMP_RNDN);
if (mpfr_cmp_ui (x, 15) || strcmp (s, "*x"))
@@ -654,7 +654,7 @@ check_parse (void)
}
- /* Check for space inside the mantissa */
+ /* Check for space inside the mantissa */
mpfr_strtofr (x, "+0x4 2@17", &s, 0, GMP_RNDN);
if (mpfr_cmp_ui (x, 4) || strcmp(s," 2@17"))
{
@@ -676,7 +676,7 @@ check_parse (void)
printf ("Failed parsing '-0b0101P 17'\n S=%s\n X=", s);
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
/* Check for Invalid exponent. */
mpfr_strtofr (x, " -0b0101PF17", &s, 0, GMP_RNDN);
if (mpfr_cmp_si (x, -5) || strcmp(s,"PF17"))
@@ -684,7 +684,7 @@ check_parse (void)
printf ("Failed parsing '-0b0101PF17'\n S=%s\n X=", s);
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
/* At least one digit in the mantissa. */
mpfr_strtofr (x, " .E10", &s, 0, GMP_RNDN);
if (strcmp(s," .E10"))
@@ -692,7 +692,7 @@ check_parse (void)
printf ("Failed parsing ' .E10'\n S=%s\n X=", s);
mpfr_out_str (stdout, 10, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
/* Check 2 '.': 2.3.4 */
mpfr_strtofr (x, "-1.2.3E4", &s, 0, GMP_RNDN);
if (mpfr_cmp_str1 (x, "-1.2") || strcmp(s,".3E4"))
@@ -700,7 +700,7 @@ check_parse (void)
printf ("Failed parsing '-1.2.3E4'\n S=%s\n X=", s);
mpfr_out_str (stdout, 10, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
/* Check for 0x */
mpfr_strtofr (x, " 0xG", &s, 0, GMP_RNDN);
if (mpfr_cmp_ui (x, 0) || strcmp(s,"xG"))
@@ -708,28 +708,28 @@ check_parse (void)
printf ("Failed parsing ' 0xG'\n S=%s\n X=", s);
mpfr_out_str (stdout, 16, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
mpfr_strtofr (x, " 0b2", &s, 0, GMP_RNDN);
if (mpfr_cmp_ui (x, 0) || strcmp(s,"b2"))
{
printf ("Failed parsing ' 0b2'\n S=%s\n X=", s);
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
mpfr_strtofr (x, "-0x.23@2Z33", &s, 0, GMP_RNDN);
if (mpfr_cmp_si (x, -0x23) || strcmp(s,"Z33"))
{
printf ("Failed parsing '-0x.23@2Z33'\n S=%s\n X=", s);
mpfr_out_str (stdout, 16, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
mpfr_strtofr (x, " 0x", &s, 0, GMP_RNDN);
if (mpfr_cmp_ui (x, 0) || strcmp(s,"x"))
{
printf ("Failed parsing ' 0x'\n S=%s\n X=", s);
mpfr_out_str (stdout, 16, 0, x, GMP_RNDN); putchar ('\n');
exit (1);
- }
+ }
mpfr_clear (x);
}
@@ -749,7 +749,7 @@ check_overflow (void)
printf ("Check overflow failed (1) with:\n s=%s\n x=", s);
mpfr_dump (x);
exit (1);
- }
+ }
mpfr_strtofr (x, "123456789E9223372036854775807", &s, 0, GMP_RNDN);
if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x) )
{
@@ -773,21 +773,21 @@ check_overflow (void)
printf ("Check overflow failed (4) with:\n s=%s\n x=", s);
mpfr_dump (x);
exit (1);
- }
+ }
mpfr_strtofr (x, "12E2147483645", &s, 0, GMP_RNDN);
if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x))
{
printf ("Check overflow failed (5) with:\n s=%s\n x=", s);
mpfr_dump (x);
exit (1);
- }
+ }
mpfr_strtofr (x, "0123456789ABCDEF@2147483640", &s, 16, GMP_RNDN);
if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x))
{
printf ("Check overflow failed (6) with:\n s=%s\n x=", s);
mpfr_dump (x);
exit (1);
- }
+ }
mpfr_strtofr (x, "0123456789ABCDEF@540000000", &s, 16, GMP_RNDN);
if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x))
{
@@ -803,7 +803,7 @@ check_overflow (void)
printf ("Check underflow failed (1) with:\n s=%s\n x=", s);
mpfr_dump (x);
exit (1);
- }
+ }
mpfr_strtofr (x, "123456789E-9223372036854775807", &s, 0, GMP_RNDN);
if (s[0] != 0 || !MPFR_IS_ZERO (x) || !MPFR_IS_POS (x) )
{
@@ -846,4 +846,4 @@ check_retval (void)
MPFR_ASSERTN (res < 0);
mpfr_clear (x);
-}
+}
diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c
index 55ea783dd..fdf52380e 100644
--- a/tests/tsub_ui.c
+++ b/tests/tsub_ui.c
@@ -134,7 +134,7 @@ main (int argc, char *argv[])
for (k=0; k<200; k++)
check_two_sum (p);
- check3 ("0.9999999999", 1, GMP_RNDN,
+ check3 ("0.9999999999", 1, GMP_RNDN,
"-10000000827403709990903735160827636718750e-50");
test_generic_ui (2, 1000, 100);
diff --git a/tests/ttan.c b/tests/ttan.c
index ac393ba3e..7f09f668f 100644
--- a/tests/ttan.c
+++ b/tests/ttan.c
@@ -69,7 +69,7 @@ check_nans (void)
MPFR_ASSERTN(mpfr_cmp (x, y) == 0);
/* Compute ~Pi/2 to check overflow */
- /* TOO SLOW! Disable this test.
+ /* TOO SLOW! Disable this test.
mpfr_set_prec (x, 20000);
mpfr_const_pi (x, GMP_RNDD); mpfr_div_2ui (x, x, 1, GMP_RNDN);
mpfr_set_prec (y, 24);
diff --git a/tests/ttanh.c b/tests/ttanh.c
index 98acc0964..38e19746f 100644
--- a/tests/ttanh.c
+++ b/tests/ttanh.c
@@ -86,7 +86,7 @@ special_overflow (void)
exit (1);
}
MPFR_ASSERTN (!mpfr_overflow_p ());
-
+
set_emin (MPFR_EMIN_MIN);
set_emax (MPFR_EMAX_MAX);
diff --git a/tests/ttrunc.c b/tests/ttrunc.c
index e34ef27bc..9a4b24ca3 100644
--- a/tests/ttrunc.c
+++ b/tests/ttrunc.c
@@ -41,7 +41,7 @@ main (void)
if (mpfr_cmp_ui (y, 1))
{
printf ("Error in mpfr_ceil for x=0.5: expected 1.0, got ");
- mpfr_print_binary(y);
+ mpfr_print_binary(y);
putchar('\n');
exit (1);
}
diff --git a/tests/tzeta.c b/tests/tzeta.c
index dda59feaa..3d3083fd6 100644
--- a/tests/tzeta.c
+++ b/tests/tzeta.c
@@ -115,7 +115,7 @@ static const char *const val[] = {
"-2.0", "0.0",
"-1.0", "-0.000101010101010101010101010101010101010101010101010101010101010",
"-0.9", "-0.000110011110011111010001010001100010111101001010100110001110110",
- /* "-0.8", "-0.000111110011101010001011100011010010000001010011110100010001110",
+ /* "-0.8", "-0.000111110011101010001011100011010010000001010011110100010001110",
"-0.7", "-0.00100101011011111100110011110011111010111111000110110100010110",
"-0.6", "-0.00101100101100100100110111111000110010111010110010111000001100",
"-0.5", "-0.00110101001110000000100000011001100100010000111100010001111100",