On Wed, 12 May 1999, Pierre Abbat wrote:
> Is there a program for factoring numbers up to, say, 2^128 in a reasonable
> time? I tried bc but it doesn't have a factor command, so I wrote a loop and it
> spent all its time outputting.
Get Richard Crandall's giantint package, it contains factor, which will
factor "any size" numbers, using a variety of algorithms.

As for time, I just did a quick test:
echo 123456789012345678901234567890123456789012345678901234 |time ./factor
Sieving...
2 * 73 * 1723 *
Commencing Pollard rho...
..................................................................
..................................................................
..................
Commencing Pollard (p-1)...
..................................................................
Commencing ECM...
Choosing curve 1, with s = 352116908, B = 1000, C = 50000:
..
17108860903
* 28685059068699533197755335074782923141
14.11user 0.01system 0:15.72elapsed 89%CPU

This on a 188MHz Pentium.

You can get giantint from http://www.perfsci.com/

-- 
Henrik Olsen,  Dawn Solutions I/S       URL=http://www.iaeste.dk/~henrik/
 `Can you count, Banjo?' He looked smug. `Yes, miss. On m'fingers, miss.'
 `So you can count up to ...?' Susan prompted.
 `Thirteen, miss,' said Banjo proudly.         Terry Pratchett, Hogfather

________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm

Reply via email to