diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-02-09 18:25:34 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-02-09 18:25:34 +0100 |
commit | b50369387a1e87b825865859931a33e995593078 (patch) | |
tree | c7881c56de4c3cbcfd2726914c8867035fed1f72 /mpn | |
parent | 4c070bd7526fa05b6169c3778b19fdc4c18196c7 (diff) | |
download | gmp-b50369387a1e87b825865859931a33e995593078.tar.gz |
mpn/generic/binvert.c: Remove unneeded mpn_sub_1.
Diffstat (limited to 'mpn')
-rw-r--r-- | mpn/generic/binvert.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mpn/generic/binvert.c b/mpn/generic/binvert.c index 6c24ab749..f1bfe031d 100644 --- a/mpn/generic/binvert.c +++ b/mpn/generic/binvert.c @@ -94,7 +94,10 @@ mpn_binvert (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr scratch) /* X <- UR. */ m = mpn_mulmod_bnm1_next_size (newrn); mpn_mulmod_bnm1 (xp, m, up, newrn, rp, rn, xp + m); - mpn_sub_1 (xp + m, xp, rn - (m - newrn), 1); + /* Only the values in the range xp + rn .. xp + newrn - 1 are + used by the _mullo_n below. + Since m >= newrn, we do not need the following. */ + /* mpn_sub_1 (xp + m, xp, rn - (m - newrn), 1); */ /* R = R(X/B^rn) */ mpn_mullo_n (rp + rn, rp, xp + rn, newrn - rn); |