mathutil
mathutil copied to clipboard
FactorInt for big.Int ?
It would be great if FactorInt supports big.Int.
Which factoring algorithm it should implement? How should the API look like?
I have no concrete idea, but we can't use the same algorithm as FactorInt(uint32)(trial division with precalculated primes) for big.Int, right?
I have no concrete idea, but we can't use the same algorithm as FactorInt(uint32)(trial division with precalculated primes) for big.Int, right?
Yes, that's definitely possible. What range of integers on input do you want to be able to factor using this approach?