summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-07-05 13:47:37 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-07-05 13:47:37 +0000
commit1dd9422c21bfbdcbe2ac08f862e607fd1d03dcf7 (patch)
tree71bc9228bc3aae905dcc32c8c67b425896fdbc21
parent1fb965cc2eeccc32ea4f9c02235f363314064756 (diff)
downloadmpfr-1dd9422c21bfbdcbe2ac08f862e607fd1d03dcf7.tar.gz
Added in-place tests for atan(+/-0).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3667 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tatan.c12
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);