Registry / utility / num-prime

num-prime

JSON →
library0.5.0rscratesunverified

Generic and optimized primality test, factorization, and number theoretic functions with arbitrary precision based on num.

# Cargo.toml [dependencies] num-prime = "0.5.0"
INSTALL
IMPORT
SIG · NUM-PRIME
N
num-prime
utilityrustv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Primality
use num_prime::Primality;

Checks if a number is prime using the Primality trait.

use num_prime::Primality; fn main() { let n = 17u64; println!("Is {} prime? {}", n, Primality::is_prime(&n)); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
num-prime — cargo add num-prime · libregistry