diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-07-05 08:03:38 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-07-05 08:03:38 +0000 |
commit | a83a062543a86251ddd8df2a48a9cb7a226f688f (patch) | |
tree | 0d19786dbf4f4a5b24f38685e6dcf50cf1b028df /tests/tatan.c | |
parent | a3353cdc017e7e803b95c3e2fa2f9aa645804860 (diff) | |
download | mpfr-a83a062543a86251ddd8df2a48a9cb7a226f688f.tar.gz |
Improve test for signed 0.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3664 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tatan.c')
-rw-r--r-- | tests/tatan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/tatan.c b/tests/tatan.c index 350b88855..3cfbe49cb 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -94,15 +94,17 @@ special (void) /* atan(+/-0) = +/-0 */ mpfr_set_ui (x, 0, GMP_RNDN); + MPFR_SET_NEG (y); mpfr_atan (y, x, GMP_RNDN); - if (mpfr_cmp_ui (y, 0) || mpfr_sgn (y) < 0) + if (mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) { printf ("Error: mpfr_atan (+0) <> +0\n"); exit (1); } mpfr_neg (x, x, GMP_RNDN); + MPFR_SET_POS (y); mpfr_atan (y, x, GMP_RNDN); - if (mpfr_cmp_ui (y, 0) || mpfr_sgn (y) > 0) + if (mpfr_cmp_ui (y, 0) || MPFR_IS_POS (y)) { printf ("Error: mpfr_atan (-0) <> -0\n"); exit (1); |