Hi Jan, On Monday, July 17, 2017 at 4:20:21 PM UTC+2, Jan Mercl wrote: > > > Just for fun: Please provide a sample in that range. > Sure:
medina:gofact> time ./factorize -r -M 191 factoring 3138550867693340381917894711603833208051177722232017256447 factors [ 383 7.068.569.257 39.940.132.241 332.584.516.519.201 87.274.497.124.602.996.457 ] ./factorize -r -M 191 29.06s user 0.48s system 106% cpu 27.773 total The -M 191 means the 191st Mersenne number ( 2^191 - 1 ) That one's 58 digits. Here's a 66 digit case ... medina:gofact> time ./factorize -r -M 219 factoring 842498333348457493583344221469363458551160763204392890034487820287 factors [ 7 439 3.943 2.298.041 9.361.973.132.609 671.165.898.617.413.417 4.815.314.615.204.347.717.321 ] ./factorize -r -M 219 1207.98s user 19.46s system 106% cpu 19:10.47 total The algorithm being used is Brent's modification of the Pollard Rho. What limits the speed of that algorithm is basically how big the 2nd largest factor is ... 90 digit number that is the product of 10, 12, 14, and 54 digit numbers (2nd largest = 14 digits), would go considerably faster than factoring a 60 digit number composed of 18 digit and 42 digit factors (2nd largest = 18 digits). I am aware that there are faster methods. This one was easy to code and is challenging enough to give a realistic feel of how well a given language might do for scientific code. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.