Skip to content

Commit ba42bcb

Browse files
debug statements
it's probably g_lifted.pow((p-1) as u32). this should be a mod_exp
1 parent ee89227 commit ba42bcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ fn factorize(n: i64) -> HashMap<i64, u32> {
158158
pub fn primitive_root(p: i64, e: u32) -> i64 {
159159
println!("primitive_root called");
160160
let g = primitive_root_mod_p(p);
161-
println!("g: {}", g);
162161
let mut g_lifted = g; // Lift it to p^e
163162
for _ in 1..e {
163+
println!("g_lifted: {}", g_lifted);
164164
if g_lifted.pow((p - 1) as u32) % p.pow(e) == 1 {
165165
g_lifted += p.pow(e - 1);
166166
}

0 commit comments

Comments
 (0)