diff options
Diffstat (limited to 'tests/tatan.c')
-rw-r--r-- | tests/tatan.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tatan.c b/tests/tatan.c index 3cfbe49cb..6d8b2c44b 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -101,6 +101,12 @@ special (void) printf ("Error: mpfr_atan (+0) <> +0\n"); exit (1); } + mpfr_atan (x, x, GMP_RNDN); + if (mpfr_cmp_ui (x, 0) || MPFR_IS_NEG (x)) + { + printf ("Error: mpfr_atan (+0) <> +0 (in place)\n"); + exit (1); + } mpfr_neg (x, x, GMP_RNDN); MPFR_SET_POS (y); mpfr_atan (y, x, GMP_RNDN); @@ -109,6 +115,12 @@ special (void) printf ("Error: mpfr_atan (-0) <> -0\n"); exit (1); } + mpfr_atan (x, x, GMP_RNDN); + if (mpfr_cmp_ui (x, 0) || MPFR_IS_POS (x)) + { + printf ("Error: mpfr_atan (-0) <> -0 (in place)\n"); + exit (1); + } mpfr_set_prec (x, 32); mpfr_set_prec (y, 32); |