Skip to content

Commit ee89227

Browse files
debug statements
1 parent 6ae50e9 commit ee89227

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ fn factorize(n: i64) -> HashMap<i64, u32> {
156156

157157
/// Fast computation of a primitive root mod p^e
158158
pub fn primitive_root(p: i64, e: u32) -> i64 {
159+
println!("primitive_root called");
159160
let g = primitive_root_mod_p(p);
161+
println!("g: {}", g);
160162
let mut g_lifted = g; // Lift it to p^e
161163
for _ in 1..e {
162164
if g_lifted.pow((p - 1) as u32) % p.pow(e) == 1 {

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ fn main() {
4545
println!("Standard polynomial mult. result: {:?}", c_std);
4646
println!("Polynomial multiplication method using NTT: {:?}", c_fast);
4747

48+
let q = 12289;
49+
let n = 512;
50+
println!("omega = {}", ntt::omega(q*q, n));
51+
4852
}

0 commit comments

Comments
 (0)