Borrowed example factorisation code for coreutils' factor program

James Youngman jay at
Sun Aug 3 00:54:40 CEST 2008

The GNU coreutils suite comes with a "factor" program (it gets
installed as /usr/bin/factor on my system) and I recently updated it
to work with arbitrarily large integers by slightly adapting the
factorize.c program from the 4.2.2 release of GNU MP.

You can see the result at;a=blob;f=src/factor.c;h=c7cd29eb74c898bc1d979a90a1d7ee270d717eab;hb=HEAD

I've tested it but I've not used GNU MP before and I've no particular
strengths in number theory, so I'd be grateful if anybody could take a
look at the result at the URL above and send me any comments.

Lastly, I'd like to credit the author of the factorize.c code in the
coreutils adaptation of the code, but authorship information is
missing from that factorize.c, and neither gmp.texi nor AUTHORS say
anything about the issue.  Does anybody know who wrote the code?


More information about the gmp-discuss mailing list