Clarification on mpz_size()

Sisyphus kalinabears at iinet.net.au
Tue Nov 23 20:58:57 CET 2004


Roberto Bagnara wrote:
> 
> 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?

Yes.

Cheers,
Rob



More information about the gmp-discuss mailing list