I need to get all the prime factors of large numbers that can easily get to 1k bits. The numbers are practically random so it shouldn\'t be hard. How do I do it efficiently?
At the moment you cannot factor a bigint with GMP. You can convert your bigint to other libraries and use their factoring algorithms. Note that factoring of integers with >>20 digits needs specialized algorithms and is near exponentially slow.
Check out: