Lines Matching defs:dn

925 		   mp_srcptr dp, mp_size_t dn)
927 assert (dn > 0);
929 if (dn == 1)
931 else if (dn == 2)
938 d1 = dp[dn-1];
939 d0 = dp[dn-2];
946 d0 = (d0 << shift) | (dp[dn-3] >> (GMP_LIMB_BITS - shift));
1037 mp_srcptr dp, mp_size_t dn,
1046 assert (dn > 2);
1047 assert (nn >= dn);
1049 d1 = dp[dn - 1];
1050 d0 = dp[dn - 2];
1055 * We divide <n1, np[dn-1+i], np[dn-2+i], np[dn-3+i],..., np[i]>
1056 * by <d1, d0, dp[dn-3], ..., dp[0] >
1059 i = nn - dn;
1062 mp_limb_t n0 = np[dn-1+i];
1067 mpn_submul_1 (np+i, dp, dn, q);
1068 n1 = np[dn-1+i]; /* update n1, last loop's value will now be invalid */
1072 gmp_udiv_qr_3by2 (q, n1, n0, n1, n0, np[dn-2+i], d1, d0, dinv);
1074 cy = mpn_submul_1 (np + i, dp, dn-2, q);
1080 np[dn-2+i] = n0;
1084 n1 += d1 + mpn_add_n (np + i, np + i, dp, dn - 1);
1094 np[dn - 1] = n1;
1099 mp_srcptr dp, mp_size_t dn,
1102 assert (dn > 0);
1103 assert (nn >= dn);
1105 if (dn == 1)
1107 else if (dn == 2)
1114 assert (inv->d1 == dp[dn-1]);
1115 assert (inv->d0 == dp[dn-2]);
1124 mpn_div_qr_pi1 (qp, np, nn, nh, dp, dn, inv->di);
1127 gmp_assert_nocarry (mpn_rshift (np, np, dn, shift));
1132 mpn_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
1137 assert (dn > 0);
1138 assert (nn >= dn);
1140 mpn_div_qr_invert (&inv, dp, dn);
1141 if (dn > 2 && inv.shift > 0)
1143 tp = gmp_xalloc_limbs (dn);
1144 gmp_assert_nocarry (mpn_lshift (tp, dp, dn, inv.shift));
1147 mpn_div_qr_preinv (qp, np, nn, dp, dn, &inv);
2167 mp_size_t ns, ds, nn, dn, qs;
2184 dn = GMP_ABS (ds);
2188 if (nn < dn)
2225 qn = nn - dn + 1;
2235 mpn_div_qr (qp, np, nn, d->_mp_d, dn);
2243 rn = mpn_normalized_size (np, dn);
3652 mp_size_t dn;
3657 dn = GMP_ABS (ds);
3659 if (limb_index >= dn)
3682 mp_size_t dn, limb_index;
3686 dn = GMP_ABS (d->_mp_size);
3691 if (limb_index >= dn)
3699 for (i = dn; i < limb_index; i++)
3701 dn = limb_index + 1;
3709 cy = mpn_add_1 (dp + limb_index, dp + limb_index, dn - limb_index, bit);
3712 dp = MPZ_REALLOC (d, dn + 1);
3713 dp[dn++] = cy;
3717 d->_mp_size = (d->_mp_size < 0) ? - dn : dn;
3723 mp_size_t dn, limb_index;
3727 dn = GMP_ABS (d->_mp_size);
3733 assert (limb_index < dn);
3736 dn - limb_index, bit));
3737 dn = mpn_normalized_size (dp, dn);
3738 d->_mp_size = (d->_mp_size < 0) ? - dn : dn;
4289 size_t dn;
4330 for (dn = 0; *sp; sp++)
4352 dp[dn++] = digit;
4355 if (!dn)
4365 alloc = (dn * bits + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
4367 rn = mpn_set_str_bits (rp, dp, dn, bits);
4373 alloc = (dn + info.exp - 1) / info.exp;
4375 rn = mpn_set_str_other (rp, dp, dn, base, &info);