summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2009-10-30 14:50:45 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2009-10-30 14:50:45 +0000
commit0dfb0f4f1a4143169461ebf724f1168bfde37e4d (patch)
treee0c421f33f53ab48e9b70b23a3dc364554e3a939
parentc0f9f41c82b9e0d1a514b651226b79ea44b74fb2 (diff)
downloadmpfr-0dfb0f4f1a4143169461ebf724f1168bfde37e4d.tar.gz
tests/tsin_cos.c: modified bug20091008 so that the failure occurs
(in the 2.4 branch). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.4@6530 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tsin_cos.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c
index 636acba4a..b30ba67d2 100644
--- a/tests/tsin_cos.c
+++ b/tests/tsin_cos.c
@@ -293,14 +293,12 @@ test20071214 (void)
mpfr_clear (b);
}
-/* Ported testcase from the trunk (r6507) without checking the inexact
- value because of its new meaning in the trunk, but it doesn't seem
- to show any bug in the 2.4 branch. */
+/* Bug fixed in the trunk in r6507. */
static void
bug20091008 (void)
{
mpfr_t x, y, z, yref, zref;
- mp_prec_t p = 1000;
+ mp_prec_t p = 3;
mp_rnd_t r = GMP_RNDN;
mpfr_init2 (x, p);
@@ -309,7 +307,7 @@ bug20091008 (void)
mpfr_init2 (yref, p);
mpfr_init2 (zref, p);
- mpfr_set_str (x, "c.91813724e28ef6a711d33e6505984699daef7fe93636c1ed5d0168bc96989cc6802f7f9e405c902ec62fb90cd39c9d21084c8ad8b5af4c4aa87bf402e2e4a78e6fe1ffeb6dbbbdbbc2983c196c518966ccc1e094ed39ee77984ef2428069d65de37928e75247edbe7007245e682616b5ebbf05f2fdefc74ad192024f10", 16, GMP_RNDN);
+ mpfr_set_str (x, "-0.111E27", 2, GMP_RNDN);
mpfr_sin_cos (yref, zref, x, r);
mpfr_sin (y, x, r);
@@ -318,15 +316,15 @@ bug20091008 (void)
if (mpfr_cmp (y, yref))
{
printf ("mpfr_sin_cos and mpfr_sin disagree (bug20091008)\n");
- printf ("yref="); mpfr_dump (yref);
- printf ("y="); mpfr_dump (y);
+ printf ("yref = "); mpfr_dump (yref);
+ printf ("y = "); mpfr_dump (y);
exit (1);
}
if (mpfr_cmp (z, zref))
{
printf ("mpfr_sin_cos and mpfr_cos disagree (bug20091008)\n");
- printf ("zref="); mpfr_dump (zref);
- printf ("z="); mpfr_dump (z);
+ printf ("zref = "); mpfr_dump (zref);
+ printf ("z = "); mpfr_dump (z);
exit (1);
}