diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/erfc.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/erfc.c | 14 |
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 */ { |