summaryrefslogtreecommitdiff
path: root/tests/tcsch.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-25 13:15:40 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-25 13:15:40 +0000
commit1df259220eb5bf13804a69312adc760057d2ce4c (patch)
treee6c66c4c3baee046681a36a0548ccfeafffb2af8 /tests/tcsch.c
parent3995ccc2ac359a2a66c567b0cc48b0ca987231e7 (diff)
downloadmpfr-1df259220eb5bf13804a69312adc760057d2ce4c.tar.gz
Use MPFR_IS_NEG and MPFR_IS_POS instead of comparing the sign with 0.
Done with perl -pi -e ' s/MPFR_SIGN *\(([^)]+)\) *<=? *0/MPFR_IS_NEG ($1)/g; s/MPFR_SIGN *\(([^)]+)\) *>=? *0/MPFR_IS_POS ($1)/g; ' {src,tests}/*.{c,h} and some manual changes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9092 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcsch.c')
-rw-r--r--tests/tcsch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tcsch.c b/tests/tcsch.c
index b3cf327a3..5cf3b686d 100644
--- a/tests/tcsch.c
+++ b/tests/tcsch.c
@@ -44,7 +44,7 @@ check_specials (void)
mpfr_set_inf (x, 1);
mpfr_csch (y, x, MPFR_RNDN);
- if (! (mpfr_zero_p (y) && MPFR_SIGN (y) >0))
+ if (! (mpfr_zero_p (y) && MPFR_IS_POS (y)))
{
printf ("Error: csch(+Inf) != +0\n");
exit (1);
@@ -52,7 +52,7 @@ check_specials (void)
mpfr_set_inf (x, -1);
mpfr_csch (y, x, MPFR_RNDN);
- if (! (mpfr_zero_p (y) && MPFR_SIGN (y) <0))
+ if (! (mpfr_zero_p (y) && MPFR_IS_NEG (y)))
{
printf ("Error: csch(-0) != -0\n");
exit (1);
@@ -77,14 +77,14 @@ check_specials (void)
/* check huge x */
mpfr_set_str (x, "8e8", 10, MPFR_RNDN);
mpfr_csch (y, x, MPFR_RNDN);
- if (! (mpfr_zero_p (y) && MPFR_SIGN (y) > 0))
+ if (! (mpfr_zero_p (y) && MPFR_IS_POS (y)))
{
printf ("Error: csch(8e8) != +0\n");
exit (1);
}
mpfr_set_str (x, "-8e8", 10, MPFR_RNDN);
mpfr_csch (y, x, MPFR_RNDN);
- if (! (mpfr_zero_p (y) && MPFR_SIGN (y) < 0))
+ if (! (mpfr_zero_p (y) && MPFR_IS_NEG (y)))
{
printf ("Error: csch(-8e8) != -0\n");
exit (1);