Support underscores for mpz/mpq assignments from strings

Sergey B Kirpichev skirpichev at
Thu Jun 10 13:40:35 UTC 2021


a common feature of modern languages is using underscores as visual
separators for digit grouping purposes in integral, floating-point and
complex number literals, see:

Some projects add workarounds for the gmp to allow this syntax, e.g.:

I think, the gmp can accept this syntax.  Tentative patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: underscores.patch
Type: text/x-diff
Size: 2080 bytes
Desc: not available
URL: <>

More information about the gmp-discuss mailing list