Extra zero byte converting mpz_t to a string

Marc Glisse marc.glisse at inria.fr
Sat Apr 18 08:15:19 UTC 2015


On Sat, 18 Apr 2015, Dmitry Antipov wrote:

> for some strange reason, an attached program outputs an unwanted
> trailing zero byte for 6!, 14!, 24!, 29!, 31!, 33!, 40!, 52!, 60!,
> 65!, 66!, 71!, 79!, 81! and 96!-100! (full output is also attached).

I didn't look closely, but did you see the doc of mpz_sizeinbase?
"The result will be either exact or 1 too big"

-- 
Marc Glisse


More information about the gmp-bugs mailing list