summaryrefslogtreecommitdiff
path: root/tests/tgamma.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-05-07 12:36:22 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-05-07 12:36:22 +0000
commit8183f455ab882c8f22e3350ef4b56c22a400fe67 (patch)
treeb6a247ef83fbdfa5ff108ea22132ef9686567785 /tests/tgamma.c
parente96e68b27d908c07382cbb0d1cf981b32bb8bdfd (diff)
downloadmpfr-8183f455ab882c8f22e3350ef4b56c22a400fe67.tar.gz
[tests/tgamma.c] Added tests for 32-bit and 64-bit machines, showing an
underflow detection bug in gamma.c (see FIXME comment added in r8185). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8197 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgamma.c')
-rw-r--r--tests/tgamma.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tgamma.c b/tests/tgamma.c
index e699614e6..3d3e972ac 100644
--- a/tests/tgamma.c
+++ b/tests/tgamma.c
@@ -1030,6 +1030,13 @@ exp_lgamma_tests (void)
Revision r8189 fails on 64-bit machines as the flag is unset. */
mpfr_set_str (x, "1.2b13fc45a92ded8@14", 16, MPFR_RNDN);
exp_lgamma (x, 53, 64);
+ /* On the following tests, with r8196, one gets an underflow on
+ 32-bit machines, while a normal result is expected (see FIXME
+ in gamma.c:382). */
+ mpfr_set_str (x, "-2ab68d6.657542f855111c6104", 16, MPFR_RNDN);
+ exp_lgamma (x, 12, 64); /* failure on 32-bit machines */
+ mpfr_set_str (x, "-12b13fc45a92deb.1c6c5bc964", 16, MPFR_RNDN);
+ exp_lgamma (x, 12, 64); /* failure on 64-bit machines */
mpfr_clear (x);
set_emin (emin);