Closed vil02 closed 9 months ago
Given that we already have an example for Pollard's rho algorithm, which looks pretty similar, and that Pollard's p-1 algorithm only works for certain numbers, I'm not sure we should add this.
Both of these algorithms work for some class of the numbers. I am not sure what is the relation between these classes - @konsumlamm do you know?
Eventually these are two different algorithms. I think it will not hurt to have both as examples.
I am okay with adding this example. It adds a little burden maintaining those examples, especially when the API is not perfectly stable, or the Nim version changes. Let's close #70 after this PR and focus on the library.
This PR adds an example of factorization using Pollard's p-1 algorithm. This is related to #70 and similar to #129.