#prime #big-int #factor #prime-factors

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

#836 in Math

Download history 223/week @ 2024-08-04 268/week @ 2024-08-11 177/week @ 2024-08-18 305/week @ 2024-08-25 228/week @ 2024-09-01 437/week @ 2024-09-08 584/week @ 2024-09-15 855/week @ 2024-09-22 702/week @ 2024-09-29 579/week @ 2024-10-06 641/week @ 2024-10-13 466/week @ 2024-10-20 744/week @ 2024-10-27 894/week @ 2024-11-03 1006/week @ 2024-11-10 1288/week @ 2024-11-17

3,959 downloads per month
Used in 28 crates (via p3-field)

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

~8MB
~133K SLoC