summaryrefslogtreecommitdiff
path: root/tests/tisnan.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-09-25 08:15:42 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-09-25 08:15:42 +0000
commitfd5e5221f3d42f1d1e29d99a15ac43a76460bf9b (patch)
tree332aef339e58cafd2dc32ee33efc6e2cbb66852a /tests/tisnan.c
parent788b255e420f8d4ba0f0b43ce87b00b62d60a896 (diff)
downloadmpfr-fd5e5221f3d42f1d1e29d99a15ac43a76460bf9b.tar.gz
Changed the remaining stderr to stdout.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2449 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tisnan.c')
-rw-r--r--tests/tisnan.c110
1 files changed, 61 insertions, 49 deletions
diff --git a/tests/tisnan.c b/tests/tisnan.c
index bed502153..31e40e7bd 100644
--- a/tests/tisnan.c
+++ b/tests/tisnan.c
@@ -1,6 +1,6 @@
/* Test file for mpfr_nan_p, mpfr_inf_p and mpfr_number_p.
-Copyright 2001 Free Software Foundation.
+Copyright 2001, 2002, 2003 Free Software Foundation.
This file is part of the MPFR Library.
@@ -37,63 +37,75 @@ main (void)
/* check +infinity gives non-zero for mpfr_inf_p only */
mpfr_set_ui (x, 1L, GMP_RNDZ);
mpfr_div_ui (x, x, 0L, GMP_RNDZ);
- if (mpfr_nan_p (x)) {
- fprintf (stderr, "Error: mpfr_nan_p(+Inf) gives non-zero\n");
- exit (1);
- }
- if (mpfr_inf_p (x) == 0) {
- fprintf (stderr, "Error: mpfr_inf_p(+Inf) gives zero\n");
- exit (1);
- }
- if (mpfr_number_p (x)) {
- fprintf (stderr, "Error: mpfr_number_p(+Inf) gives non-zero\n");
- exit (1);
- }
+ if (mpfr_nan_p (x))
+ {
+ printf ("Error: mpfr_nan_p(+Inf) gives non-zero\n");
+ exit (1);
+ }
+ if (mpfr_inf_p (x) == 0)
+ {
+ printf ("Error: mpfr_inf_p(+Inf) gives zero\n");
+ exit (1);
+ }
+ if (mpfr_number_p (x))
+ {
+ printf ("Error: mpfr_number_p(+Inf) gives non-zero\n");
+ exit (1);
+ }
/* same for -Inf */
mpfr_neg (x, x, GMP_RNDN);
- if (mpfr_nan_p (x)) {
- fprintf (stderr, "Error: mpfr_nan_p(-Inf) gives non-zero\n");
- exit (1);
- }
- if (mpfr_inf_p (x) == 0) {
- fprintf (stderr, "Error: mpfr_inf_p(-Inf) gives zero\n");
- exit (1);
- }
- if (mpfr_number_p (x)) {
- fprintf (stderr, "Error: mpfr_number_p(-Inf) gives non-zero\n");
- exit (1);
- }
+ if (mpfr_nan_p (x))
+ {
+ printf ("Error: mpfr_nan_p(-Inf) gives non-zero\n");
+ exit (1);
+ }
+ if (mpfr_inf_p (x) == 0)
+ {
+ printf ("Error: mpfr_inf_p(-Inf) gives zero\n");
+ exit (1);
+ }
+ if (mpfr_number_p (x))
+ {
+ printf ("Error: mpfr_number_p(-Inf) gives non-zero\n");
+ exit (1);
+ }
/* same for NaN */
mpfr_sub (x, x, x, GMP_RNDN);
- if (mpfr_nan_p (x) == 0) {
- fprintf (stderr, "Error: mpfr_nan_p(NaN) gives zero\n");
- exit (1);
- }
- if (mpfr_inf_p (x)) {
- fprintf (stderr, "Error: mpfr_inf_p(NaN) gives non-zero\n");
- exit (1);
- }
- if (mpfr_number_p (x)) {
- fprintf (stderr, "Error: mpfr_number_p(NaN) gives non-zero\n");
- exit (1);
- }
+ if (mpfr_nan_p (x) == 0)
+ {
+ printf ("Error: mpfr_nan_p(NaN) gives zero\n");
+ exit (1);
+ }
+ if (mpfr_inf_p (x))
+ {
+ printf ("Error: mpfr_inf_p(NaN) gives non-zero\n");
+ exit (1);
+ }
+ if (mpfr_number_p (x))
+ {
+ printf ("Error: mpfr_number_p(NaN) gives non-zero\n");
+ exit (1);
+ }
/* same for an ordinary number */
mpfr_set_ui (x, 1, GMP_RNDN);
- if (mpfr_nan_p (x)) {
- fprintf (stderr, "Error: mpfr_nan_p(1) gives non-zero\n");
- exit (1);
- }
- if (mpfr_inf_p (x)) {
- fprintf (stderr, "Error: mpfr_inf_p(1) gives non-zero\n");
- exit (1);
- }
- if (mpfr_number_p (x) == 0) {
- fprintf (stderr, "Error: mpfr_number_p(1) gives zero\n");
- exit (1);
- }
+ if (mpfr_nan_p (x))
+ {
+ printf ("Error: mpfr_nan_p(1) gives non-zero\n");
+ exit (1);
+ }
+ if (mpfr_inf_p (x))
+ {
+ printf ("Error: mpfr_inf_p(1) gives non-zero\n");
+ exit (1);
+ }
+ if (mpfr_number_p (x) == 0)
+ {
+ printf ("Error: mpfr_number_p(1) gives zero\n");
+ exit (1);
+ }
mpfr_clear (x);