diff options
-rw-r--r-- | src/cos.c | 2 | ||||
-rw-r--r-- | src/lngamma.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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. */ diff --git a/src/lngamma.c b/src/lngamma.c index 682888601..d07ea033e 100644 --- a/src/lngamma.c +++ b/src/lngamma.c @@ -490,7 +490,7 @@ GAMMA_FUNC (mpfr_ptr y, mpfr_srcptr z0, mpfr_rnd_t rnd) mpfr_mul (u, u, u, MPFR_RNDN); /* 1/z^2 * (1+u)^3 */ /* m <= maxm ensures that 2*m*(2*m+1) <= ULONG_MAX */ - maxm = 1UL << (GMP_NUMB_BITS / 2 - 1); + maxm = 1UL << (sizeof(unsigned long) * CHAR_BIT / 2 - 1); /* s:(1+u)^15, t:(1+u)^2, t <= 3/128 */ |