summaryrefslogtreecommitdiff
path: root/tests/tatan.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-08-28 14:18:35 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-08-28 14:18:35 +0000
commita716cdbbc1577c5806a1d082f70b4b8bf05b043e (patch)
tree747d430a24fc0621e834a5879bfbe68927980cb8 /tests/tatan.c
parentffc9542e44dfe450542fab4148a537ac98b75064 (diff)
downloadmpfr-a716cdbbc1577c5806a1d082f70b4b8bf05b043e.tar.gz
tatan.c: added small-value tests in the other rounding modes.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4791 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tatan.c')
-rw-r--r--tests/tatan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tatan.c b/tests/tatan.c
index 9e4fdb3b5..e187f859a 100644
--- a/tests/tatan.c
+++ b/tests/tatan.c
@@ -386,12 +386,19 @@ smallvals_atan2 (void)
MPFR_ASSERTN (mpfr_equal_p (a, y));
/* From a bug reported by Christopher Creutzig on 2007-08-28.
+ Added test in each rounding mode.
Segmentation fault or assertion failure due to an infinite Ziv loop. */
mpfr_set_si (y, 1, GMP_RNDN);
mpfr_set_exp (y, mpfr_get_emin ());
mpfr_set_str_binary (x, "1.01");
+ mpfr_atan2 (a, y, x, GMP_RNDZ);
+ MPFR_ASSERTN (mpfr_zero_p (a));
+ mpfr_atan2 (a, y, x, GMP_RNDD);
+ MPFR_ASSERTN (mpfr_zero_p (a));
mpfr_atan2 (a, y, x, GMP_RNDU);
MPFR_ASSERTN (mpfr_equal_p (a, y));
+ mpfr_atan2 (a, y, x, GMP_RNDN);
+ MPFR_ASSERTN (mpfr_equal_p (a, y));
mpfr_set_emin (old_emin);