#prime #primality #primality-test

no-std is-prime-for-primitive-int

is_prime for primitive ineger type

7 releases (4 breaking)

0.5.1 Dec 17, 2021
0.5.0 Aug 4, 2021
0.4.0 Feb 2, 2021
0.3.1 Jan 2, 2021
0.1.0 Dec 29, 2020

#277 in No standard library

Download history 79/week @ 2024-07-19 81/week @ 2024-07-26 60/week @ 2024-08-02 86/week @ 2024-08-09 72/week @ 2024-08-16 72/week @ 2024-08-23 70/week @ 2024-08-30 61/week @ 2024-09-06 56/week @ 2024-09-13 85/week @ 2024-09-20 81/week @ 2024-09-27 66/week @ 2024-10-04 68/week @ 2024-10-11 61/week @ 2024-10-18 52/week @ 2024-10-25 44/week @ 2024-11-01

233 downloads per month
Used in 2 crates

AGPL-3.0-or-later

7KB
196 lines

is-prime-for-primitive-int

usage

use is_prime_for_primitive_int::IsPrime;
assert_eq!(2.is_prime(), true);
assert_eq!(57.is_prime(), false);
assert_eq!(91.is_prime(), false);
assert_eq!(97.is_prime(), true);

Licence

AGPL-3.0-or-later

No runtime deps