nim-lang / bigints

BigInts for Nim
MIT License
123 stars 32 forks source link

[Feature request] Add more examples : factorization, find modular square-root #70

Closed dlesnoff closed 9 months ago

dlesnoff commented 2 years ago

To showcase what can be done with the library, as well to benchmark it, I propose to add examples for factorization with simple exponential algorithms like rho-pollard, p-1 or p+1. We would need for these gcd and powmod algorithms currently in PR #65 and #66.

We could also improve/adapt the algorithm published on Rosetta Code for Shanks-Tonelli . Some examples could not be computed with only nim's integer native library and have a need for multi-precision arithmetic.

Too much examples might make the library size big, but they help to define a good API, to understand which feature are essential and which one needs optimization.

narimiran commented 9 months ago

Fixed by #138