YoushouldhavereceivedcopiesoftheGNUGeneralPublicLicenseandthe GNULesserGeneralPublicLicensealongwiththeGNUMPLibrary.Ifnot,
see https://www.gnu.org/licenses/. */
usize = SIZ (u); if (usize == 0)
{
MPZ_NEWALLOC (w, 1)[0] = vval;
SIZ (w) = VARIATION_NEG (vval != 0); return;
}
abs_usize = ABS (usize);
if (usize VARIATION_CMP 0)
{
mp_limb_t cy;
/* If not space for W (and possible carry), increase space. */
wp = MPZ_REALLOC (w, abs_usize + 1); /* These must be after realloc (U may be the same as W). */
up = PTR (u);
cy = mpn_add_1 (wp, up, abs_usize, (mp_limb_t) vval);
wp[abs_usize] = cy;
wsize = VARIATION_NEG (abs_usize + cy);
} else
{ /* If not space for W, increase space. */
wp = MPZ_REALLOC (w, abs_usize); /* These must be after realloc (U may be the same as W). */
up = PTR (u);
/* The signs are different. Need exact comparison to determine
which operand to subtract from which. */ if (abs_usize == 1 && up[0] < vval)
{
wp[0] = vval - up[0];
wsize = VARIATION_NEG 1;
} else
{
mpn_sub_1 (wp, up, abs_usize, (mp_limb_t) vval); /* Size can decrease with at most one limb. */
wsize = VARIATION_UNNEG (abs_usize - (wp[abs_usize - 1] == 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.