Clarification on mpz_size()

Roberto Bagnara bagnara at
Tue Nov 23 11:59:10 CET 2004

I have a doubt concerning the interpretation of the documentation of
`mpz_size()': let `x' be of type `mpz_t'.  Is the intended semantics
of `mpz_size()' such that the expression

   mpz_size(x) == 0 || mpz_getlimbn(x, mpz_size(x)-1) != 0

always evaluates to true?
All the best,


Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
mailto:bagnara at

More information about the gmp-discuss mailing list