Limitation of the mpz_get_str function

Vincent Lefevre vincent at vinc17.net
Tue Feb 16 13:46:15 UTC 2021


On 2021-02-16 14:22:20 +0100, Christophe Clavier wrote:
> I suggest to modify the type of i to long int or to unsigned long int.

long or unsigned long may still be on 32 bits, e.g. under MS Windows.

I think that a more appropriate type in the context of a string
(or more generally an array of char) would be size_t.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list