A basic attempt at an optimized prime factorization tool.
Just something I thought I'd try my hand at after reading up on RSA, Shor's algorithm, etc.
The factorization algorithm is my own, using a lower_limit
and an upper_limit
to reduce the number of iterations required to narrow down a prime factor.
This also means that there is probably scope for a lot more further optimizations.
Compile yourself or download the latest release.
$ primrose [number]
My competence with C++ is questionable, so there are a few things that can be improved.
- Replace
long long
with a proper datatype that can handle bigger integers - Attempt to further optimize
isPrime
algorithm - Attempt to further optimize
factorize
algorithm