From fe046df7fa7c39b8195acf6d3250d06786dfdf14 Mon Sep 17 00:00:00 2001 From: wbhart Date: Mon, 31 May 2010 22:54:02 +0000 Subject: [PATCH] Fixed the same bug in dc_divappr_q.c --- mpn/generic/dc_divappr_q.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mpn/generic/dc_divappr_q.c b/mpn/generic/dc_divappr_q.c index dfd9cde5..b716ec2a 100644 --- a/mpn/generic/dc_divappr_q.c +++ b/mpn/generic/dc_divappr_q.c @@ -186,7 +186,11 @@ mpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, q2p = TMP_ALLOC_LIMBS (qn + 1); - if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_N_THRESHOLD)) + if (qn == 1) + { + qh = mpn_divrem_2(q2p, 0, np - 3, 4, dp - 2); + } + else if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_N_THRESHOLD)) { qh = mpn_sb_divappr_q (q2p, np - qn - 2, 2 * (qn + 1), dp - (qn + 1), qn + 1, dinv);