summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2009-11-10 14:54:26 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2009-11-10 14:54:26 +0000
commit841c01e3e3ec93a9f62cf516e7b75efd6d6bade0 (patch)
treebbf47c92c82a2338dda2dcccfea365cae9dc6ed2
parentbe65ebaa313849ae5710b6565b697360690f6c10 (diff)
downloadmpfr-841c01e3e3ec93a9f62cf516e7b75efd6d6bade0.tar.gz
tests/tcos.c: added testcase associated with the bug fixed in r6536.
[Ported testcase r6534 from the trunk.] git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.4@6542 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tcos.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tcos.c b/tests/tcos.c
index 32ad3ebc4..65ff076e0 100644
--- a/tests/tcos.c
+++ b/tests/tcos.c
@@ -239,6 +239,19 @@ overflowed_cos0 (void)
mpfr_clear (y);
}
+static void
+bug20091030 (void)
+{
+ mpfr_t x, y;
+
+ mpfr_init2 (x, 5);
+ mpfr_init2 (y, 2);
+ mpfr_set_str (x, "-0.11001E3", 2, GMP_RNDN);
+ mpfr_cos (y, x, GMP_RNDN);
+ mpfr_clear (x);
+ mpfr_clear (y);
+}
+
int
main (int argc, char *argv[])
{
@@ -360,6 +373,8 @@ main (int argc, char *argv[])
mpfr_clear (x);
mpfr_clear (y);
+ bug20091030 ();
+
data_check ("data/cos", mpfr_cos, "mpfr_cos");
bad_cases (mpfr_cos, mpfr_acos, "mpfr_cos", 256, -40, 0, 4, 128, 800, 50);