diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-10-25 17:49:57 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-10-25 17:49:57 +0000 |
commit | e2748856b898f29b86815d34982ff34a452655e5 (patch) | |
tree | 5d0c8301758d9fc0f4c56edd77a0135086c02afa /tests/tcoth.c | |
parent | 8e11845df8d98488067a7a612573b2fd1ff8cd9b (diff) | |
download | mpfr-e2748856b898f29b86815d34982ff34a452655e5.tar.gz |
fixed overflow/underflow problems in csch and sech
fixed problem for huge argument in coth
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4161 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcoth.c')
-rw-r--r-- | tests/tcoth.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/tcoth.c b/tests/tcoth.c index 94605256d..1fef81189 100644 --- a/tests/tcoth.c +++ b/tests/tcoth.c @@ -98,6 +98,34 @@ check_bugs (void) exit (1); } + mpfr_set_prec (x, 53); + mpfr_set_prec (y, 53); + + mpfr_set_str (x, "18.368400284838550", 10, GMP_RNDN); + mpfr_set_str (y, "1.0000000000000002", 10, GMP_RNDN); + mpfr_coth (x, x, GMP_RNDN); + if (mpfr_cmp (x, y) != 0) + { + printf ("Error for coth(18.368400284838550)\n"); + exit (1); + } + + mpfr_set_str (x, "18.714973875118520", 10, GMP_RNDN); + mpfr_coth (x, x, GMP_RNDN); + if (mpfr_cmp (x, y) != 0) + { + printf ("Error for coth(18.714973875118520)\n"); + exit (1); + } + + mpfr_set_str (x, "18.714973875118524", 10, GMP_RNDN); + mpfr_coth (x, x, GMP_RNDN); + if (mpfr_cmp_ui (x, 1) != 0) + { + printf ("Error for coth(18.714973875118524)\n"); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); } |