summaryrefslogtreecommitdiff
path: root/tests/tsech.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tsech.c')
-rw-r--r--tests/tsech.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tsech.c b/tests/tsech.c
index 3a585763e..623def916 100644
--- a/tests/tsech.c
+++ b/tests/tsech.c
@@ -75,6 +75,22 @@ check_specials (void)
exit (1);
}
+ /* check huge x */
+ mpfr_set_str (x, "8e8", 10, GMP_RNDN);
+ mpfr_sech (y, x, GMP_RNDN);
+ if (! (mpfr_zero_p (y) && MPFR_SIGN (y) > 0))
+ {
+ printf ("Error: sech(8e8) != +0\n");
+ exit (1);
+ }
+ mpfr_set_str (x, "-8e8", 10, GMP_RNDN);
+ mpfr_sech (y, x, GMP_RNDN);
+ if (! (mpfr_zero_p (y) && MPFR_SIGN (y) > 0))
+ {
+ printf ("Error: sech(-8e8) != +0\n");
+ exit (1);
+ }
+
mpfr_clear (x);
mpfr_clear (y);
}