bodrato at bodrato at
Thu Jun 21 19:10:20 CEST 2012


Il Gio, 14 Giugno 2012 9:42 pm, bodrato at ha scritto:
> 2) gmp-impl.h defines the unused macro MPN_SIZEINBASE_16.
> Can we remove it?

I suggest to replace it with the macro MPN_SIZEINBASE_2EXP currently
defined in mpz/export.c .

This macro should be used also to count the size in bits, with base2exp=1,
in e.g. mpz/n_pow_ui.c, mpz/get_d_2exp.c, mpn/rootrem.c, mpn/powlo.c ...
This way we can have all of them supporting nails the same way.

But the question is: which type should we use for _SIZEINBASE internals?
I'm tempted to use mp_bitcnt_t, but both mpn_sizeinbase and mpz_sizeinbase
return a size_t. Suggestions?



More information about the gmp-devel mailing list