bug in gmp_fprintf still in next release?
Marc Glisse
marc.glisse at inria.fr
Fri Sep 27 11:41:34 UTC 2019
On Fri, 27 Sep 2019, Torbjörn Granlund wrote:
> paul zimmermann <Paul.Zimmermann at inria.fr> writes:
>
> four years ago [1] I reported an issue with gmp_fprintf in GMP 6.1.0,
> which cannot print correcly a number of 8589934589 bits (less than 2^33).
>
> I just checked with today's snapshot: the issue is still there.
>
> Yikes!
>
> Will the next GMP release be still limited to less than 2^33 bits?
>
> Probably.
>
> I believe the issue is the printf family's use of 'int' for sizes. We
> cannot really get around that in gmp_*printf* while staying compatible.
> (I assume it was poor design by us in the first place not to use some
> wider signed type.)
The report was also about mpz_get_str, which does not have this
limitation. And for printf, it should be possible to make it print
correctly and return a nonsense integer.
--
Marc Glisse
More information about the gmp-bugs
mailing list