mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
factor::miller_rabin: Add test for the largest 64b composite numbers
This commit is contained in:
parent
308290325a
commit
0a1200bdb8
1 changed files with 7 additions and 0 deletions
|
@ -121,6 +121,13 @@ mod tests {
|
|||
assert!(is_prime(LARGEST_U64_PRIME));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn largest_composites() {
|
||||
for i in LARGEST_U64_PRIME + 1..=u64::MAX {
|
||||
assert!(!is_prime(i), "2⁶⁴ - {} reported prime", u64::MAX - i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn first_primes() {
|
||||
use crate::table::{NEXT_PRIME, P_INVS_U64};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue