Add mpz_inp_str to mini-gmp

Austyn Krutsinger akrutsinger at gmail.com
Tue Jul 5 10:31:38 UTC 2016


I appreciate all of the effort that the community has put into
complementing the gmp library with mini-gmp. I was using mini-gmp a couple
days ago and wanted to read in a number from a FILE stream and noticed that
the mpz_inp_str function wasn't available in mini-gmp, so I added it.

I'd ask that the community take a look at the attached patch against
gmp-6.1.1. In addition to the mpz_inp_str function, I added a test case
that is just an expansion of the gmp library test case. The only difference
is a couple bigger random numbers to convert and test.

I am not sure if there was a reason FILE streams were not implemented
before, but if there is I'd be interested in hearing why. I hope someone
can find this useful.

Cheers,

Austyn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-mpz_inp_str-and-test-case.patch
Type: application/octet-stream
Size: 12591 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20160705/caab1150/attachment.obj>


More information about the gmp-devel mailing list