mini-gmp provides mpz_fits_slong_p ad mpz_fits_uslingt_p, but it does not provide the same for smaller integer types. In my case "int" is what is used, but if those two "missing" functions are added then mpz_fits_sshort_p / mpz_fits_ushort_p may be easy to add on the way, too. Thank you for considering this, Simon Sobisch