YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
#include"gmp-impl.h"
int
mpf_cmp_ui (mpf_srcptr u, unsignedlongint vval) __GMP_NOTHROW
{
mp_srcptr up;
mp_size_t usize;
mp_exp_t uexp;
mp_limb_t ulimb;
usize = SIZ (u);
/* 1. Is U negative? */ if (usize < 0) return -1; /* We rely on usize being non-negative in the code that follows. */
if (vval == 0) return usize != 0;
/* 2. Are the exponents different (V's exponent == 1)? */
uexp = EXP (u);
/* 3. Compare the most significant mantissa limb with V. */ if (ulimb != vval) return (ulimb < vval) ? -1 : 1;
/* Ignore zeroes at the low end of U. */ for (; *up == 0; ++up)
--usize;
/* 4. Now, if the number of limbs are different, we have a difference
since we have made sure the trailing limbs are not zero. */ return (usize > 0);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.