summaryrefslogtreecommitdiff
path: root/tests/tasinh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-08-10 01:18:46 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-08-10 01:18:46 +0000
commit504d7f95f8ce89e2b8d133f4f577e2100871dfcf (patch)
tree730c32487d6f939288bf6d715410d1017070b075 /tests/tasinh.c
parent290c150c23e5b29ef50b6f2b5d9bdac117fcfc95 (diff)
downloadmpfr-504d7f95f8ce89e2b8d133f4f577e2100871dfcf.tar.gz
tasinh.c: added worst case that yields an assertion failure.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4740 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tasinh.c')
-rw-r--r--tests/tasinh.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/tasinh.c b/tests/tasinh.c
index 1b4412cf0..b271816d3 100644
--- a/tests/tasinh.c
+++ b/tests/tasinh.c
@@ -99,7 +99,7 @@ special (void)
mpfr_set_str_binary (x, "0.1010100100111011001111100101E-1");
mpfr_asinh (x, x, GMP_RNDN);
mpfr_set_str_binary (y, "0.10100110010010101101010011011101E-1");
- if (mpfr_cmp (x, y))
+ if (!mpfr_equal_p (x, y))
{
printf ("Error: mpfr_asinh (1)\n");
exit (1);
@@ -108,7 +108,7 @@ special (void)
mpfr_set_str_binary (x, "-.10110011011010111110010001100001");
mpfr_asinh (x, x, GMP_RNDN);
mpfr_set_str_binary (y, "-.10100111010000111001011100110011");
- if (mpfr_cmp (x, y))
+ if (!mpfr_equal_p (x, y))
{
printf ("Error: mpfr_asinh (2)\n");
exit (1);
@@ -120,12 +120,24 @@ special (void)
mpfr_asinh (y, x, GMP_RNDZ);
mpfr_init2 (z, 43);
mpfr_set_str_binary (z, "0.1100111101010101101010101110000001000111001");
- if (mpfr_cmp (y, z))
+ if (!mpfr_equal_p (y, z))
{
printf ("Error: mpfr_asinh (3)\n");
exit (1);
}
+ mpfr_set_prec (x, 53);
+ mpfr_set_prec (y, 2);
+ mpfr_set_str (x, "1.8000000000009@-6", 16, GMP_RNDN);
+ mpfr_asinh (y, x, GMP_RNDZ);
+ mpfr_init2 (z, 2);
+ mpfr_set_str (z, "1.0@-6", 16, GMP_RNDN);
+ if (!mpfr_equal_p (y, z))
+ {
+ printf ("Error: mpfr_asinh (4)\n");
+ exit (1);
+ }
+
mpfr_clear (x);
mpfr_clear (y);
mpfr_clear (z);