#factor #prime #big-int #prime-factors #primality #factorization #function

no-std bin+lib nums

Number theoretic functions, such as primality testing and factorization, for BigUints

2 releases (1 stable)

1.0.0 May 23, 2024
0.1.0 May 7, 2024

#427 in Math

Download history 237/week @ 2024-05-06 97/week @ 2024-05-13 239/week @ 2024-05-20 234/week @ 2024-05-27 270/week @ 2024-06-03 117/week @ 2024-06-10 101/week @ 2024-06-17 63/week @ 2024-06-24

575 downloads per month

MIT/Apache

54KB
1.5K SLoC

nums

This library contains some number theoretic functions, such as primality testing and factorization, for BigUints.

Status

Primality tests:

  • Trial division
  • Miller-Rabin

Factorization:

  • Trial division
  • Pollard's rho
  • Quadratic sieve
  • General number sieve

License

Licensed under either of

at your option.

Licensing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~5–7.5MB
~126K SLoC