YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
if (bi <= nbits)
{ return p[0] & (((mp_limb_t) 1 << bi) - 1);
} else
{
bi -= nbits; /* bit index of low bit to extract */
i = bi / GMP_NUMB_BITS; /* word index of low bit to extract */
bi %= GMP_NUMB_BITS; /* bit index in low word */
r = p[i] >> bi; /* extract (low) bits */
nbits_in_r = GMP_NUMB_BITS - bi; /* number of bits now in r */ if (nbits_in_r < nbits) /* did we get enough bits? */
r += p[i + 1] << nbits_in_r; /* prepend bits from higher word */ return r & (((mp_limb_t) 1 << nbits) - 1);
}
}
/* rp[n-1..0] = bp[n-1..0] ^ ep[en-1..0] mod B^n, B is the limb base. Requiresthatep[en-1]isnon-zero.
Uses scratch space tp[3n-1..0], i.e., 3n words. */ /* We only use n words in the scratch space, we should pass tp + n to
mullo/sqrlo as a temporary area, it is needed. */ void
mpn_powlo (mp_ptr rp, mp_srcptr bp,
mp_srcptr ep, mp_size_t en,
mp_size_t n, mp_ptr tp)
{ unsigned cnt;
mp_bitcnt_t ebi; unsigned windowsize, this_windowsize;
mp_limb_t expbits;
mp_limb_t *pp; long i; int flipflop;
TMP_DECL;
/* Precompute odd powers of b and put them in the temporary area at pp. */
i = (1 << (windowsize - 1)) - 1; do
{
last_pp = this_pp;
this_pp += n;
mpn_mullo_n (this_pp, last_pp, tp, n);
} while (--i != 0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.