summaryrefslogtreecommitdiff
path: root/tests/tdiv.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-02-26 18:21:14 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-02-26 18:21:14 +0000
commitaeef493ea312de44629ce5ee5be5a1f36b457e7c (patch)
tree3f87f396bc3372a5eef99d5758cebd180d2b734f /tests/tdiv.c
parent782cd53f560eb9be24682a9e4fb30f78cc95df0b (diff)
downloadmpfr-aeef493ea312de44629ce5ee5be5a1f36b457e7c.tar.gz
Add tests with round away mode.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6032 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tdiv.c')
-rw-r--r--tests/tdiv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/tdiv.c b/tests/tdiv.c
index 159ca5f14..9d23d0f65 100644
--- a/tests/tdiv.c
+++ b/tests/tdiv.c
@@ -159,6 +159,7 @@ check_float(void)
check24("105553133043712.0", "8388610.0", GMP_RNDD, "1.2582911e7");
check24("105553124655104.0", "8388610.0", GMP_RNDD, "1.258291e7");
+ check24("70368760954880.0", "8388609.0", GMP_RNDA, "8.388609e6");
}
static void
@@ -171,12 +172,16 @@ check_double(void)
GMP_RNDZ, "-3.6655920045905428978e119");
check53("9.89438396044940256501e-134", "5.93472984109987421717e-67",GMP_RNDU,
"1.6672003992376663654e-67");
+ check53("9.89438396044940256501e-134", "5.93472984109987421717e-67",GMP_RNDA,
+ "1.6672003992376663654e-67");
check53("9.89438396044940256501e-134", "-5.93472984109987421717e-67",
GMP_RNDU, "-1.6672003992376663654e-67");
check53("-4.53063926135729747564e-308", "7.02293374921793516813e-84",
GMP_RNDD, "-6.4512060388748850857e-225");
check53("6.25089225176473806123e-01","-2.35527154824420243364e-230",
GMP_RNDD, "-2.6540006635008291192e229");
+ check53("6.25089225176473806123e-01","-2.35527154824420243364e-230",
+ GMP_RNDA, "-2.6540006635008291192e229");
check53("6.52308934689126e15", "-1.62063546601505417497e273", GMP_RNDN,
"-4.0250194961676020848e-258");
check53("1.04636807108079349236e-189", "3.72295730823253012954e-292",
@@ -245,7 +250,7 @@ check_convergence (void)
mpfr_set_prec(x, i);
mpfr_set_prec(y, i);
mpfr_set_ui(x, 1, GMP_RNDN);
- for (j = 0;j < GMP_RND_MAX; j++)
+ RND_LOOP(j)
{
mpfr_set_ui (y, 1, GMP_RNDN);
test_div (y, x, y, (mp_rnd_t) j);
@@ -323,7 +328,7 @@ check_hard (void)
mpfr_nextbelow (u);
for (i = 0; i <= 2; i++)
{
- for (rnd = 0; rnd < GMP_RND_MAX; rnd++)
+ RND_LOOP(rnd)
{
inex = test_div (q, u, v, (mp_rnd_t) rnd);
inex2 = get_inexact (q, u, v);