[PATCH 01/20] Delete mpn/generic/sizeinbase.c

Niels Möller nisse at lysator.liu.se
Thu Jan 2 20:32:37 UTC 2014

Torbjorn Granlund <tg at gmplib.org> writes:

> This makes sense to me.  Please apply (and please write documentation!).


Not sure about the right interface. Now, the docs says that it is
required that n > 0 and that the input must be normalized (i.e., top
limb non-zero), even though the current implementation also allows n =

I'm thinking that maybe it makes sense to generalize the function to
allow unnormalized input. If so, one also has to specify the return
value in case the input is zero. I'm leaning towards returning 0 in this
case, but maybe consistency with the mpz function (which returns 1) is
more important.

That would be a compatible extension of the currently documented
interface, so it doesn't have to be decided before release.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list