summaryrefslogtreecommitdiff
path: root/src/add1sp.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-02-13 14:49:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-02-13 14:49:52 +0000
commit664f30de30ab8856bfd93d2f9efc8417a7009f0d (patch)
tree165ab408559061e09b6ce1afe19d9ea46d584c8f /src/add1sp.c
parent755fa1511add526ded6225a2342e30f69d911d37 (diff)
downloadmpfr-664f30de30ab8856bfd93d2f9efc8417a7009f0d.tar.gz
[src/add1sp.c] Moved a MPFR_ASSERTD to the right place.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12230 280ebfd0-de03-0410-8827-d642c229c3f4
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);