diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-07-10 08:52:50 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-07-10 08:52:50 +0000 |
commit | 2ce17f43eae0c6c07307d36a48913b938458843e (patch) | |
tree | 457f8354ca761be873f3ad28a7aa157159e38a3f /tests/terf.c | |
parent | 4dbf2652540ba5f21e134403262fdf303e7eb1ce (diff) | |
download | mpfr-2ce17f43eae0c6c07307d36a48913b938458843e.tar.gz |
terf.c: added testcase for bug reported by Christopher Creutzig.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4635 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/terf.c')
-rw-r--r-- | tests/terf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/terf.c b/tests/terf.c index 0a9d283e6..6985350f0 100644 --- a/tests/terf.c +++ b/tests/terf.c @@ -483,6 +483,22 @@ large_arg (void) exit (1); } + /* Reported by Christopher Creutzig on 2007-07-10. + I took the result from Maple. -- VL. */ + mpfr_set_prec (x, 53); + mpfr_set_prec (y, 53); + mpfr_set_si_2exp (x, 54563, -1, GMP_RNDN); + mpfr_erfc (y, x, GMP_RNDZ); + mpfr_set_str_binary (x, + "0.11110001000000001010111000101011001010011101000111101E-1073769430"); + if (! mpfr_equal_p (x, y)) + { + printf ("mpfr_erfc failed for x=27281.5, prec=53 (6)\n"); + printf ("expected "); mpfr_dump (x); + printf ("got "); mpfr_dump (y); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); } |