summaryrefslogtreecommitdiff
path: root/tests/tlngamma.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-09-09 09:26:22 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-09-09 09:26:22 +0000
commit81a062aa8bef9a5a7073cf31ebd5f4f76a44b383 (patch)
treeaf4b29b332a70b630ec569bcb22202771fcea0d8 /tests/tlngamma.c
parent0fad99e6a690c6f115b1e15a038670b9d4b0c3c4 (diff)
downloadmpfr-81a062aa8bef9a5a7073cf31ebd5f4f76a44b383.tar.gz
cleanup of gamma and lngamma
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3813 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tlngamma.c')
-rw-r--r--tests/tlngamma.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/tlngamma.c b/tests/tlngamma.c
index 9c399da78..a4e421ba3 100644
--- a/tests/tlngamma.c
+++ b/tests/tlngamma.c
@@ -97,25 +97,27 @@ special (void)
mpfr_set_prec (y, 53);
#define CHECK_X1 "1.0762904832837976166"
-#define CHECK_Y1 -0.039418362817587634939
+#define CHECK_Y1 "-0.039418362817587634939"
mpfr_set_str (x, CHECK_X1, 10, GMP_RNDN);
mpfr_lngamma (y, x, GMP_RNDN);
- if (mpfr_get_d (y, GMP_RNDN) != CHECK_Y1 )
+ mpfr_set_str (x, CHECK_Y1, 10, GMP_RNDN);
+ if (mpfr_cmp (y, x))
{
printf ("mpfr_lngamma("CHECK_X1") is wrong: expected %1.20e, got %1.20e\n",
- CHECK_Y1, mpfr_get_d (y, GMP_RNDN));
+ mpfr_get_d (x, GMP_RNDN), mpfr_get_d (y, GMP_RNDN));
exit (1);
}
#define CHECK_X2 "9.23709516716202383435e-01"
-#define CHECK_Y2 0.049010669407893718563
+#define CHECK_Y2 "0.049010669407893718563"
mpfr_set_str (x, CHECK_X2, 10, GMP_RNDN);
mpfr_lngamma (y, x, GMP_RNDN);
- if (mpfr_get_d (y, GMP_RNDN) != CHECK_Y2)
+ mpfr_set_str (x, CHECK_Y2, 10, GMP_RNDN);
+ if (mpfr_cmp (y, x))
{
printf ("mpfr_lngamma("CHECK_X2") is wrong: expected %1.20e, got %1.20e\n",
- CHECK_Y2, mpfr_get_d (y, GMP_RNDN));
+ mpfr_get_d (x, GMP_RNDN), mpfr_get_d (y, GMP_RNDN));
exit (1);
}