Fixed some bugs in the division code.

This commit is contained in:
(no author) 2010-03-16 02:03:45 +00:00
parent c2d5d9d012
commit 1760e9e242
2 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}