Fixed some bugs in the division code.
This commit is contained in:
parent
c2d5d9d012
commit
1760e9e242
@ -162,7 +162,8 @@ mpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn,
|
||||
qp -= qn;
|
||||
np -= dn;
|
||||
qsave = qp[qn];
|
||||
mpn_dc_divappr_q_n (qp, np - dn, dp - dn, dn, dinv, tp);
|
||||
cy = mpn_dc_divappr_q_n (qp, np - dn, dp - dn, dn, dinv, tp);
|
||||
if (UNLIKELY(cy)) mpn_sub_1(qp, qp, dn, 1);
|
||||
MPN_COPY_INCR (qp, qp + 1, qn);
|
||||
qp[qn] = qsave;
|
||||
}
|
||||
|
@ -171,7 +171,8 @@ mpn_inv_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn,
|
||||
qp -= qn;
|
||||
np -= dn;
|
||||
qsave = qp[qn];
|
||||
mpn_inv_divappr_q_n (qp, np - dn, dp - dn, dn, dinv);
|
||||
cy = mpn_inv_divappr_q_n (qp, np - dn, dp - dn, dn, dinv);
|
||||
if (UNLIKELY(cy)) mpn_sub_1(qp, qp, dn, 1);
|
||||
MPN_COPY_INCR (qp, qp + 1, qn);
|
||||
qp[qn] = qsave;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user