summaryrefslogtreecommitdiff
path: root/tests/tgmpop.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2010-08-19 08:56:31 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2010-08-19 08:56:31 +0000
commit788d16fb8c034c49d7ddc5533a578beb4a6ef9c1 (patch)
tree9a785edbf6c2f6e32491abe3b12be1ad6d5b79ce /tests/tgmpop.c
parentb53b99833bb275898e80b089dec2ac56b18e981f (diff)
downloadmpfr-788d16fb8c034c49d7ddc5533a578beb4a6ef9c1.tar.gz
[tests/tgmpop.c] Fix rounding mode in overflow tests
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7100 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgmpop.c')
-rw-r--r--tests/tgmpop.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/tgmpop.c b/tests/tgmpop.c
index 40eeac607..ce0f9d440 100644
--- a/tests/tgmpop.c
+++ b/tests/tgmpop.c
@@ -593,12 +593,6 @@ test_specialq (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N,
}
}
-#if 0
-
-/* The following tests seem buggy. They compute a product of positive
- numbers that overflows in MPFR_RNDD. But in this rounding mode, the
- result should not be an infinity (result expected by the tests). */
-
static void
bug_mul_q_20100810 (void)
{
@@ -615,7 +609,7 @@ bug_mul_q_20100810 (void)
mpq_set_ui (q, 4096, 3);
mpfr_set_inf (x, +1);
mpfr_nextbelow (x);
- inexact = mpfr_mul_q (y, x, q, MPFR_RNDD);
+ inexact = mpfr_mul_q (y, x, q, MPFR_RNDU);
if (inexact <= 0)
{
@@ -659,7 +653,7 @@ bug_div_q_20100810 (void)
mpq_set_ui (q, 3, 4096);
mpfr_set_inf (x, +1);
mpfr_nextbelow (x);
- inexact = mpfr_div_q (y, x, q, MPFR_RNDD);
+ inexact = mpfr_div_q (y, x, q, MPFR_RNDU);
if (inexact <= 0)
{
@@ -687,8 +681,6 @@ bug_div_q_20100810 (void)
mpfr_clear (x);
}
-#endif
-
static void
bug_mul_div_q_20100818 (void)
{
@@ -879,8 +871,8 @@ main (int argc, char *argv[])
check_for_zero ();
- /* bug_mul_q_20100810 ();
- bug_div_q_20100810 (); */
+ bug_mul_q_20100810 ();
+ bug_div_q_20100810 ();
bug_mul_div_q_20100818 ();
reduced_expo_range ();