Jacob Zhong 8bc171fa11 Minor fixes
2022-04-18 11:19:25 -04:00
2022-04-18 11:19:25 -04:00
2022-04-18 11:19:25 -04:00
2022-01-07 23:32:40 -05:00
2022-04-17 22:22:05 -04:00
2022-01-08 21:22:18 -05:00
2022-03-16 10:22:42 -04:00
2022-04-17 14:13:45 -04:00

num-prime

This crate provides utilities for prime number related functionalities:

  • Primality testing
    • Deterministic primality check of u64 integers (using a very fast hashing algorithm)
    • Fermat probable prime test
    • Miller-rabin probable prime test
    • (strong/extra strong) Lucas probable prime test
    • Baillie-PSW test
    • Sophie Germain safe prime test
  • Primes generation and indexing
    • A naive implementation of the sieve of Eratosthenes
    • Unified API to support other prime generation backends
    • Generate random (safe) primes
    • Find previous/next prime
  • Integer factorization
    • Trial division
    • Pollard's rho algorithm
    • Shanks's square forms factorization (SQUFOF)
    • Fast factorization of u64 integers
  • Number theoretic functions
    • Prime Pi function (number of primes under limit), its estimation and its bounds
    • Nth prime, its estimation and its bounds
    • Moebius function

It's based on the num creates and most functions are decently optimized with pre-computed tables.

S
Description
No description provided
Readme 950 KiB
Languages
Rust 98.7%
Shell 1.3%