YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
if (size == 1)
{
s = src[0]; if (s > c)
{
l = s-c;
h = l % d; if (h != 0)
h = d - h;
} else
{
l = c-s;
h = l % d;
} return h;
}
binvert_limb (inverse, d);
dmul = d << GMP_NAIL_BITS;
i = 0; do
{
s = src[i];
SUBC_LIMB (c, l, s, c);
l = (l * inverse) & GMP_NUMB_MASK;
umul_ppmm (h, dummy, l, dmul);
c += h;
} while (++i < size-1);
s = src[i]; if (s <= d)
{ /* With high<=d the final step can be a subtract and addback. If c==0 thentheaddbackwillrestoretol>=0.Ifc==dthenwillgetl==d
if s==0, but that's ok per the function definition. */
l = c - s; if (c < s)
l += d;
ret = l;
} else
{ /* Can't skip a divide, just do the loop code once more. */
SUBC_LIMB (c, l, s, c);
l = (l * inverse) & GMP_NUMB_MASK;
umul_ppmm (h, dummy, l, dmul);
c += h;
ret = c;
}
ASSERT (orig_c < d ? ret < d : ret <= d); return ret;
}
#if0
/* The following is an alternate form that might shave one cycle on a superscalarprocessorsinceittakesc+=hoffthedependentchain, leavingjustalowproduct,highproduct,andasubtract.
Noticethatcisonlyever0or1,sinceifs-cproducesaborrowthen x=0xFF..FFandx-hcannotproduceaborrow.Thec=(x>s)couldbecome
c=(x==0xFF..FF) too, if that helped. */
binvert_limb (inverse, d);
dmul = d << GMP_NAIL_BITS;
for (i = 0; i < size; i++)
{
ASSERT (c==0 || c==1);
s = src[i];
SUBC_LIMB (c1, x, s, c);
SUBC_LIMB (c2, y, x, h);
c = c1 + c2;
y = (y * inverse) & GMP_NUMB_MASK;
umul_ppmm (h, dummy, y, dmul);
}
h += c; return h;
}
#endif
Messung V0.5 in Prozent
¤ 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.0.18Bemerkung:
(vorverarbeitet am 2026-10-01)
¤
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.