summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-11-09 11:57:03 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-11-09 11:57:03 +0000
commita3959b12b554428cac4f85208e0621178e64bf68 (patch)
tree88f3d7c8b7f0aa6ab1fd4d0973dbe743c7e2458e /tests
parent23b48b957f8fd928d6ac721bf8a30fdb4a27ac27 (diff)
downloadmpfr-a3959b12b554428cac4f85208e0621178e64bf68.tar.gz
Added a test for mpfr_cbrt, from the following failure with MPFR 2.2
and gcc 4.0.2 under Linux/m68k: Seed GMP_CHECK_RANDOMIZE=1131612275 (include this in bug reports) results differ for x=1.1000e-2 prec=5 rnd_mode=GMP_RNDN got 1.1000e-1 expected 1.0111e-1 approx 0.101110001001100E0 FAIL: tcbrt git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3945 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/tcbrt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tcbrt.c b/tests/tcbrt.c
index f22c4f0ee..d1efd858a 100644
--- a/tests/tcbrt.c
+++ b/tests/tcbrt.c
@@ -128,6 +128,18 @@ special (void)
exit (1);
}
+ /* Bug (in the compiler?) found on Linux/m68k with gcc 4.0.2 */
+ mpfr_set_prec (x, 5);
+ mpfr_set_prec (y, 5);
+ mpfr_set_str_binary (x, "1.1000E-2");
+ mpfr_cbrt (y, x, GMP_RNDN);
+ mpfr_set_str_binary (x, "1.0111E-1");
+ if (mpfr_cmp (x, y))
+ {
+ printf ("Error in cbrt (6)\n");
+ exit (1);
+ }
+
mpfr_clear (x);
mpfr_clear (y);
}