YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
#include"gmp-impl.h"
int
mpz_divisible_2exp_p (mpz_srcptr a, mp_bitcnt_t d) __GMP_NOTHROW
{
mp_size_t i, dlimbs; unsigned dbits;
mp_ptr ap;
mp_limb_t dmask;
mp_size_t asize;
asize = ABSIZ(a);
dlimbs = d / GMP_NUMB_BITS;
/* if d covers the whole of a, then only a==0 is divisible */ if (asize <= dlimbs) return asize == 0;
/* whole limbs must be zero */
ap = PTR(a); for (i = 0; i < dlimbs; i++) if (ap[i] != 0) return0;
/* left over bits must be zero */
dbits = d % GMP_NUMB_BITS;
dmask = (CNST_LIMB(1) << dbits) - 1; return (ap[dlimbs] & dmask) == 0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-29)
¤
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.