Home | History | Annotate | Download | only in generic

Lines Matching refs:an

40 /* Determine whether A={ap,an} is divisible by D={dp,dn}.  Must have both
41 operands normalized, meaning high limbs non-zero, except that an==0 is
50 Getting the remainder limb by limb would make an early exit possible on
60 mpn_divisible_p (mp_srcptr ap, mp_size_t an,
70 ASSERT (an >= 0);
71 ASSERT (an == 0 || ap[an-1] != 0);
74 ASSERT_MPN (ap, an);
78 Notice this test covers all cases of an==0. */
79 if (an < dn)
80 return (an == 0);
95 an--; ASSERT (an >= 1);
108 if (ABOVE_THRESHOLD (an, BMOD_1_TO_MOD_1_THRESHOLD))
109 return mpn_mod_1 (ap, an, dlow) == 0;
113 return mpn_modexact_1_odd (ap, an, dlow) == 0;
124 return MPN_MOD_OR_MODEXACT_1_ODD (ap, an, dlow) == 0;
138 TMP_ALLOC_LIMBS_2 (rp, an + 1,
139 qp, an - dn + 1); /* FIXME: Could we avoid this? */
147 ASSERT_NOCARRY (mpn_rshift (rp, ap, an, twos));
151 MPN_COPY (rp, ap, an);
153 if (rp[an - 1] >= dp[dn - 1])
155 rp[an] = 0;
156 an++;
158 else if (an == dn)
164 ASSERT (an > dn); /* requirement of functions below */
167 BELOW_THRESHOLD (an - dn, DC_BDIV_QR_THRESHOLD))
170 mpn_sbpi1_bdiv_qr (qp, rp, an, dp, dn, -di);
171 rp += an - dn;
176 mpn_dcpi1_bdiv_qr (qp, rp, an, dp, dn, -di);
177 rp += an - dn;
181 tp = TMP_ALLOC_LIMBS (mpn_mu_bdiv_qr_itch (an, dn));
182 mpn_mu_bdiv_qr (qp, rp, rp, an, dp, dn, tp);