diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-05-12 14:57:36 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-05-12 14:57:36 +0000 |
commit | ca368ce7b054d8a88731ee0bd5494d0a7a3c3bca (patch) | |
tree | faa438922c2fe3346e4f2901a6aebd8d418d2716 /tests/ttan.c | |
parent | 7ae2b8ad31c98f6d322b137989132c99be903b44 (diff) | |
download | mpfr-ca368ce7b054d8a88731ee0bd5494d0a7a3c3bca.tar.gz |
Add a potential test (Too slow).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2914 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/ttan.c')
-rw-r--r-- | tests/ttan.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ttan.c b/tests/ttan.c index bcda94716..ade8a16a8 100644 --- a/tests/ttan.c +++ b/tests/ttan.c @@ -68,6 +68,19 @@ check_nans (void) mpfr_set_str_binary (x, "101110011011001100100001E-24"); MPFR_ASSERTN(mpfr_cmp (x, y) == 0); + /* Compute ~Pi/2 to check overflow */ + /* TOO SLOW! Disable this test. + mpfr_set_prec (x, 20000); + mpfr_const_pi (x, GMP_RNDD); mpfr_div_2ui (x, x, 1, GMP_RNDN); + mpfr_set_prec (y, 24); + mpfr_tan (y, x, GMP_RNDN); + if (mpfr_cmp_str (y, "0.100011101101011000100011E20001", 2, GMP_RNDN)) + { + printf("Error computing tan(~Pi/2)\n"); + mpfr_dump (y); + exit (1); + } */ + mpfr_clear (x); mpfr_clear (y); } |