YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
int
isprime (unsignedlongint t)
{ unsignedlongint q, r, d;
if (t < 32) return (0xa08a28acUL >> t) & 1; if ((t & 1) == 0) return0;
if (t % 3 == 0) return0; if (t % 5 == 0) return0; if (t % 7 == 0) return0;
for (d = 11;;)
{
q = t / d;
r = t - q * d; if (q < d) return1; if (r == 0) break;
d += 2;
q = t / d;
r = t - q * d; if (q < d) return1; if (r == 0) break;
d += 4;
} return0;
}
int
log2_ceil (int n)
{ int e;
assert (n >= 1); for (e = 0; ; e++) if ((1 << e) >= n) break; return e;
}
/* Set inv to the inverse of d, in the style of invert_limb, ie. for
udiv_qrnnd_preinv. */ void
mpz_preinv_invert (mpz_t inv, const mpz_t d, int numb_bits)
{
mpz_t t; int norm;
assert (SIZ(d) > 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.