diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-11-20 11:00:45 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-11-20 11:00:45 +0000 |
commit | 329346c8c76a7cc9ffa5ab792276e06ab983ad44 (patch) | |
tree | 998eab796d10860886e423635d04dd0368478b41 /tests | |
parent | 30b5e3a641ba38d5411d58cb502c39f0878c853b (diff) | |
download | mpfr-329346c8c76a7cc9ffa5ab792276e06ab983ad44.tar.gz |
fixed bug in overflow test
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4249 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tgamma.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/tgamma.c b/tests/tgamma.c index df0471eb8..9e8ca7746 100644 --- a/tests/tgamma.c +++ b/tests/tgamma.c @@ -374,6 +374,20 @@ special_overflow (void) exit (1); } + mpfr_set_emax (1024); + mpfr_set_prec (x, 53); + mpfr_set_prec (y, 53); + mpfr_set_str_binary (x, "101010110100110011111010000110001000111100000110101E-43"); + mpfr_gamma (x, x, GMP_RNDU); + mpfr_set_str_binary (y, "110000011110001000111110110101011110000100001111111E971"); + if (mpfr_cmp (x, y) != 0) + { + printf ("Error for gamma(4)\n"); + printf ("expected "); mpfr_dump (y); + printf ("got "); mpfr_dump (x); + exit (1); + } + mpfr_clear (y); mpfr_clear (x); set_emin (MPFR_EMIN_MIN); |