diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 14:33:12 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 14:33:12 +0000 |
commit | 206f7135b7061a5536e612846b29f5fefbcb716f (patch) | |
tree | 0660fa70efcc90254f711b7c7024159fa6660300 /tests | |
parent | 89127c9656b03f2e3f13c045ef76b8649154ca77 (diff) | |
download | mpfr-206f7135b7061a5536e612846b29f5fefbcb716f.tar.gz |
[rint.c] fixed a bug incorporated with the round away mode
[tget_sj.c] fixed the tests for round away
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6041 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tget_sj.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tget_sj.c b/tests/tget_sj.c index 51c293f1d..40de1b601 100644 --- a/tests/tget_sj.c +++ b/tests/tget_sj.c @@ -79,6 +79,9 @@ check_sj (intmax_t s, mpfr_ptr x) continue; if (rnd == GMP_RNDU && i > 0) continue; + if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || + (MPFR_IS_NEG(y) && i < 0))) + continue; /* rint (y) == x == s */ r = mpfr_get_sj (y, (mp_rnd_t) rnd); if (r != s) @@ -119,6 +122,9 @@ check_uj (uintmax_t u, mpfr_ptr x) continue; if (rnd == GMP_RNDU && i > 0) continue; + if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || + (MPFR_IS_NEG(y) && i < 0))) + continue; /* rint (y) == x == u */ r = mpfr_get_uj (y, (mp_rnd_t) rnd); if (r != u) |