Support underscores for mpz/mpq assignments from strings

Hans Åberg haberg-1 at
Mon Jun 14 12:50:43 UTC 2021

> On 14 Jun 2021, at 10:59, Vincent Lefevre <vincent at> wrote:
> On 2021-06-11 18:20:01 +0200, Hans Åberg wrote:
>> But you can probably cannot change mpz_set_str,
>> because it is modelled on C behavior.
> It isn't. In C, whitespace isn't a separator.

The GMP manual, sec. 5.2, is not clear on this, as it says that whitespace is discarded, whereas in C/C++ it is only the initial whitespace.

More information about the gmp-discuss mailing list