diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/cos.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/cos.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cos.c b/Build/source/libs/mpfr/mpfr-src/src/cos.c index 18968e83231..d5a77159496 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/cos.c +++ b/Build/source/libs/mpfr/mpfr-src/src/cos.c @@ -49,7 +49,7 @@ mpfr_cos2_aux (mpfr_ptr f, mpfr_srcptr r) /* compute minimal i such that i*(i+1) does not fit in an unsigned long, assuming that there are no padding bits. */ - maxi = 1UL << (CHAR_BIT * sizeof(unsigned long) / 2); + maxi = 1UL << (sizeof(unsigned long) * CHAR_BIT / 2); if (maxi * (maxi / 2) == 0) /* test checked at compile time */ { /* can occur only when there are padding bits. */ @@ -174,7 +174,7 @@ mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) } K0 = __gmpfr_isqrt (precy / 3); - m = precy + 2 * MPFR_INT_CEIL_LOG2 (precy) + 2 * K0; + m = precy + 2 * MPFR_INT_CEIL_LOG2 (precy) + 2 * K0 + 4; if (expx >= 3) { @@ -245,7 +245,7 @@ mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) l = 2 * l + 1; if (reduce) l += (K == 0) ? 4 : 1; - k = MPFR_INT_CEIL_LOG2 (l) + 2*K; + k = MPFR_INT_CEIL_LOG2 (l) + 2 * K; /* now the error is bounded by 2^(k-m) = 2^(EXP(s)-err) */ exps = MPFR_GET_EXP (s); |