diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-04-25 12:48:05 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-04-25 12:48:05 +0000 |
commit | 0d0aecde2a0f09624cbe477c60b665dc07d8bf9b (patch) | |
tree | b9fd52a2b836e6c434347416624f247327f952a3 /tests/tlngamma.c | |
parent | 73425fc77d5fc1b05931f3c2e1be9deaf9300982 (diff) | |
download | mpfr-0d0aecde2a0f09624cbe477c60b665dc07d8bf9b.tar.gz |
Added preliminary support for mpfr_lngamma and tests.
TODO: add support for negative numbers with small exponent.
Re-enable the generic tests when this is done.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4413 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tlngamma.c')
-rw-r--r-- | tests/tlngamma.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tlngamma.c b/tests/tlngamma.c index 0c7f81351..30dc9d848 100644 --- a/tests/tlngamma.c +++ b/tests/tlngamma.c @@ -208,6 +208,18 @@ special (void) exit (1); } + mpfr_set_prec (x, 256); + mpfr_set_prec (y, 32); + mpfr_set_si_2exp (x, -1, 200, GMP_RNDN); + mpfr_sub_ui (x, x, 1, GMP_RNDN); + mpfr_div_2ui (x, x, 1, GMP_RNDN); + mpfr_lngamma (y, x, GMP_RNDN); + if (!mpfr_nan_p (y)) + { + printf ("Error for lngamma(-2^199-0.5)\n"); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); } |