diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-01-16 16:01:55 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-01-16 16:01:55 +0000 |
commit | 53e4fc7c14c9c4b9b3be6b941d853ac1fcc7f81a (patch) | |
tree | 6ca0f6baf11496ffc528a474687f4326c00e9796 /tests/ttan.c | |
parent | 3d3b3c4428015d063a0b8b5b1519588ab37920d1 (diff) | |
download | mpfr-53e4fc7c14c9c4b9b3be6b941d853ac1fcc7f81a.tar.gz |
replaced isnan() by Isnan()
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2180 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/ttan.c')
-rw-r--r-- | tests/ttan.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/ttan.c b/tests/ttan.c index f0efd5eb9..54c999b13 100644 --- a/tests/ttan.c +++ b/tests/ttan.c @@ -38,13 +38,14 @@ check53 (double x, double tan_x, mp_rnd_t rnd_mode) mpfr_init2 (s, 53); mpfr_set_d (xx, x, rnd_mode); /* should be exact */ mpfr_tan (s, xx, rnd_mode); - if (mpfr_get_d1 (s) != tan_x && (!isnan(tan_x) || !mpfr_nan_p(s))) { - fprintf (stderr, "mpfr_tan failed for x=%1.20e, rnd=%s\n", x, - mpfr_print_rnd_mode (rnd_mode)); - fprintf (stderr, "mpfr_tan gives tan(x)=%1.20e, expected %1.20e\n", - mpfr_get_d1 (s), tan_x); - exit(1); - } + if (mpfr_get_d1 (s) != tan_x && !(Isnan(tan_x) && mpfr_nan_p(s))) + { + fprintf (stderr, "mpfr_tan failed for x=%1.20e, rnd=%s\n", x, + mpfr_print_rnd_mode (rnd_mode)); + fprintf (stderr, "mpfr_tan gives tan(x)=%1.20e, expected %1.20e\n", + mpfr_get_d1 (s), tan_x); + exit (1); + } mpfr_clear (xx); mpfr_clear (s); } |