summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/erfc.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-12-26 11:50:03 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-12-26 11:50:03 +0000
commit6ddc203e5368cf1d4108e64c18b0bf6c7d53d176 (patch)
treedda1d9b65325699c60418cfcd02fa5d800cde1f8 /Build/source/libs/mpfr/mpfr-src/src/erfc.c
parentbbfe0bab9260ac7a06a69f710b053dcc73cecad2 (diff)
mpfr-4.0.0
git-svn-id: svn://tug.org/texlive/trunk@46140 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/erfc.c')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/erfc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/erfc.c b/Build/source/libs/mpfr/mpfr-src/src/erfc.c
index b2a7151ab0a..8424e8927b4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/erfc.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/erfc.c
@@ -149,7 +149,7 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
return mpfr_set_ui (y, 1, rnd);
}
- if (MPFR_SIGN (x) > 0)
+ if (MPFR_IS_POS (x))
{
/* by default, emin = 1-2^30, thus the smallest representable
number is 1/2*2^emin = 2^(-2^30):
@@ -160,7 +160,7 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
mpfr_cmp_ui (x, 1787897414) >= 0)
{
/* May be incorrect if MPFR_EMAX_MAX >= 2^62. */
- MPFR_ASSERTN ((MPFR_EMAX_MAX >> 31) >> 31 == 0);
+ MPFR_STAT_STATIC_ASSERT ((MPFR_EMAX_MAX >> 31) >> 31 == 0);
return mpfr_underflow (y, (rnd == MPFR_RNDN) ? MPFR_RNDZ : rnd, 1);
}
}
@@ -168,7 +168,7 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
/* Init stuff */
MPFR_SAVE_EXPO_MARK (expo);
- if (MPFR_SIGN (x) < 0)
+ if (MPFR_IS_NEG (x))
{
mpfr_exp_t e = MPFR_EXP(x);
/* For x < 0 going to -infinity, erfc(x) tends to 2 by below.
@@ -185,7 +185,7 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
{
near_two:
mpfr_set_ui (y, 2, MPFR_RNDN);
- mpfr_set_inexflag ();
+ MPFR_SET_INEXFLAG ();
if (rnd == MPFR_RNDZ || rnd == MPFR_RNDD)
{
mpfr_nextbelow (y);
@@ -220,7 +220,7 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
/* erfc(x) ~ 1, with error < 2^(EXP(x)+1) */
MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, __gmpfr_one, - MPFR_GET_EXP (x) - 1,
- 0, MPFR_SIGN(x) < 0,
+ 0, MPFR_IS_NEG (x),
rnd, inex = _inexact; goto end);
prec = MPFR_PREC (y) + MPFR_INT_CEIL_LOG2 (MPFR_PREC (y)) + 3;
@@ -229,12 +229,12 @@ mpfr_erfc (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
mpfr_init2 (tmp, prec);
- MPFR_ZIV_INIT (loop, prec); /* Initialize the ZivLoop controler */
+ MPFR_ZIV_INIT (loop, prec); /* Initialize the ZivLoop controller */
for (;;) /* Infinite loop */
{
/* use asymptotic formula only whenever x^2 >= p*log(2),
otherwise it will not converge */
- if (MPFR_SIGN (x) > 0 &&
+ if (MPFR_IS_POS (x) &&
2 * MPFR_GET_EXP (x) - 2 >= MPFR_INT_CEIL_LOG2 (prec))
/* we have x^2 >= p in that case */
{