test if an unsigned long fits in a limb.
tg at gmplib.org
Wed Mar 7 14:16:16 CET 2012
nisse at lysator.liu.se (Niels Möller) writes:
I'm not following you. Surely, on all platforms supported by GMP,
mp_limb_t is a type supported by the compiler?
As for functions taking arguments of type long long, that support would
have to depend on a configure check for long long, and exclude that
interface if long long is not present. I don't think that should be a
big deal; If a program used that feature it will fail to work on systems
without long long, but the reason for the failure is not primarily that
the functions were excluded in the GMP build, but that the program uses
a type not supported by the compiler.
But what is the GMP API then?
I suppose one could filter gmp-h.in further, to allow for compile-time
checks in use code. But I think it is highly doubtful if that would
"improve the GMP experience". :-)
More information about the gmp-devel