diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-01-27 08:00:00 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-01-27 08:00:00 +0000 |
commit | d9c942c32b39399e742c63db32f7e8d6abeed91f (patch) | |
tree | 9f1cba57c17d717dccce4daeaaf52b4b3ff44a4d /tests/tcbrt.c | |
parent | 7cc179df7803e12907347efbaa7a8c174076490f (diff) | |
download | mpfr-d9c942c32b39399e742c63db32f7e8d6abeed91f.tar.gz |
fixed bugs in atan cbrt erf
added new hard-coded tests
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2648 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcbrt.c')
-rw-r--r-- | tests/tcbrt.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/tcbrt.c b/tests/tcbrt.c index 748a5da88..6705c2446 100644 --- a/tests/tcbrt.c +++ b/tests/tcbrt.c @@ -98,7 +98,7 @@ special (void) mpfr_set_prec (x, 32); mpfr_set_prec (y, 32); mpfr_set_str_binary (x, "-0.1100001110110000010101011001011"); - mpfr_cbrt (x, x, GMP_RNDN); + mpfr_cbrt (x, x, GMP_RNDD); mpfr_set_str_binary (y, "-0.11101010000100100101000101011001"); if (mpfr_cmp (x, y)) { @@ -106,6 +106,28 @@ special (void) exit (1); } + mpfr_set_prec (x, 82); + mpfr_set_prec (y, 27); + mpfr_set_str_binary (x, "0.1010001111011101011011000111001011001101100011110110010011011011011010011001100101e-7"); + mpfr_cbrt (y, x, GMP_RNDD); + mpfr_set_str_binary (x, "0.101011110001110001000100011E-2"); + if (mpfr_cmp (x, y)) + { + printf ("Error in cbrt (4)\n"); + exit (1); + } + + mpfr_set_prec (x, 204); + mpfr_set_prec (y, 38); + mpfr_set_str_binary (x, "0.101000000001101000000001100111111011111001110110100001111000100110100111001101100111110001110001011011010110010011100101111001111100001010010100111011101100000011011000101100010000000011000101001010001001E-5"); + mpfr_cbrt (y, x, GMP_RNDD); + mpfr_set_str_binary (x, "0.10001001111010011011101000010110110010E-1"); + if (mpfr_cmp (x, y)) + { + printf ("Error in cbrt (5)\n"); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); } |