Torbjorn Granlund <t...@gmplib.org> writes: > Checked old mail, but it is only mentioned 7 months earlier, when Kevin > aded it. It does not make sense as an internal function, the > MPN_SIZEINBASE macro plays its role. > > I suppose we could preserve it, and make it public.
Below a patch to that effect. I think it's good to make this function public. Needs documentation. *Maybe* it doesn't need its own tests, since it's the same as mpz_sizeinbase but with different argument type. Regards, /Niels diff -r ffe8c8da8c90 configure.ac --- a/configure.ac Wed Jan 01 16:45:58 2014 +0100 +++ b/configure.ac Wed Jan 01 23:07:15 2014 +0100 @@ -2800,7 +2800,8 @@ mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ mulmid_basecase toom42_mulmid mulmid_n mulmid \ random random2 pow_1 \ - rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + rootrem sqrtrem sizeinbase get_str set_str \ + scan0 scan1 popcount hamdist cmp \ perfsqr perfpow \ gcd_1 gcd gcdext_1 gcdext gcd_subdiv_step \ gcdext_lehmer \ diff -r ffe8c8da8c90 gmp-h.in --- a/gmp-h.in Wed Jan 01 16:45:58 2014 +0100 +++ b/gmp-h.in Wed Jan 01 23:07:15 2014 +0100 @@ -1575,6 +1575,9 @@ #define mpn_set_str __MPN(set_str) __GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); +#define mpn_sizeinbase __MPN(sizeinbase) +__GMP_DECLSPEC size_t mpn_sizeinbase (mp_srcptr, mp_size_t, int); + #define mpn_sqrtrem __MPN(sqrtrem) __GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel