Skip to content

Commit

Permalink
Add testcases to test_pollard_rho.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
koba-e964 committed Sep 5, 2024
1 parent 8770313 commit d8f887b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions comm/test_pollard_rho.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ include!("pollard_rho.rs");
fn main() {
use pollard_rho::*;
assert_eq!(factorize(4681), vec![(31, 1), (151, 1)]);
// https://lpha-z.hatenablog.com/entry/2023/01/15/231500
assert_eq!(factorize(124376107291), vec![(352523, 1), (352817, 1)]);
assert_eq!(factorize(273772559), vec![(15881, 1), (17239, 1)]);
assert_eq!(factorize(2059), vec![(29, 1), (71, 1)]);
assert_eq!(factorize(385515865499), vec![(599477, 1), (643087, 1)]);

// Performs Eratosthenes sieve
const W: usize = 1_000_000;
Expand Down

0 comments on commit d8f887b

Please sign in to comment.