ni...@lysator.liu.se (Niels Möller) writes: t...@gmplib.org (Torbjörn Granlund) writes: > I suppose it also implies a slight computation overhead > to check size + low limb for the return value. Slight enough to be reasonably for the mpz-layer, I think. Yep, something akin to
return gp[0] | gn; should do, since we can surely assume gp[0] is valid. One could consider doing that only when the gcd pointer is NULL, and otherwise return some arbitrary value. But that's not a pretty interface to document... For mpn I think such neat interfaces are conceivable, but not great. -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel