thanks Pete, will try it in a while
I found some entries on the Rosetta Code https://rosettacode.org/wiki/Prime_decomposition
I tried the FreeBasic implementation because there's an easy to use GMP header for BigInt and changing the code from integer to BigInt is trivial
but as I was playing with it I found that some integers are easy to factorize while others are hard, for example
factor(314159265358979323846264338327950288419716939937510582097) took less than a second, but
factor(31415926535897932384626433832795028841971693993751058209749) is still running
even the pari/gp calculator took 1.6 seconds
by the way, the factors for the last one are 3, 37, 65665363877655791, 4310131680920695304618177764671198362549
I found some entries on the Rosetta Code https://rosettacode.org/wiki/Prime_decomposition
I tried the FreeBasic implementation because there's an easy to use GMP header for BigInt and changing the code from integer to BigInt is trivial
but as I was playing with it I found that some integers are easy to factorize while others are hard, for example
factor(314159265358979323846264338327950288419716939937510582097) took less than a second, but
factor(31415926535897932384626433832795028841971693993751058209749) is still running
even the pari/gp calculator took 1.6 seconds
by the way, the factors for the last one are 3, 37, 65665363877655791, 4310131680920695304618177764671198362549