Inconsistent string conversions

Torbjörn Granlund tg at
Tue Sep 5 18:19:30 UTC 2017

Austyn Krutsinger <akrutsinger at> writes:

  mpz_set_str(a, "1234    56789", 10); /* a = 123456789 */
That behaviour is intentional, but not a design decision I am proud of.

I believe mpz_inp_str is more reasonably designed (although I'd have
named in mpz_in_str today...).

We should perhaps change it incompatibly, or declare mpz_set_str as
obsolete and provide a more versatile function in the spirit of

See also <>.

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list