#prime #primality #primality-test #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

#273 in No standard library

Download history 61/week @ 2024-09-01 62/week @ 2024-09-08 52/week @ 2024-09-15 96/week @ 2024-09-22 75/week @ 2024-09-29 66/week @ 2024-10-06 62/week @ 2024-10-13 61/week @ 2024-10-20 59/week @ 2024-10-27 51/week @ 2024-11-03 58/week @ 2024-11-10 64/week @ 2024-11-17 65/week @ 2024-11-24 56/week @ 2024-12-01 73/week @ 2024-12-08 68/week @ 2024-12-15

271 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