summaryrefslogtreecommitdiff
path: root/src/add1sp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/add1sp.c')
-rw-r--r--src/add1sp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/add1sp.c b/src/add1sp.c
index 1d83894e4..4a69c33f3 100644
--- a/src/add1sp.c
+++ b/src/add1sp.c
@@ -632,8 +632,9 @@ mpfr_addrsh (mp_limb_t *ap, mp_limb_t *bp, mp_limb_t *cp, mp_size_t n,
if (d < GMP_NUMB_BITS)
{
/* {ap, n} <- {bp, n} + {cp, n} >> d */
+ MPFR_ASSERTD (d > 0);
+ /* thus 0 < GMP_NUMB_BITS - d < GMP_NUMB_BITS */
*low = cp[0] << (GMP_NUMB_BITS - d);
- MPFR_ASSERTD(d > 0);
for (i = 0, cy = 0; i < n - 1; i++)
{
c_shifted = (cp[i+1] << (GMP_NUMB_BITS - d)) | (cp[i] >> d);