Skip to content
Snippets Groups Projects
Commit 406ec9ff authored by Mihails VALTUSOVS's avatar Mihails VALTUSOVS :speech_balloon:
Browse files

fix jacobi::compute() to i8

parent 6e978b68
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ use num_traits::{Zero, One};
// use partial_application::partial!;
// Based on http://math.fau.edu/richman/jacobi.htm
pub fn compute(m: &BigUint, n: &BigUint) -> i32 {
pub fn compute(m: &BigUint, n: &BigUint) -> i8 {
// println!("compute {}, {}", m, n);
let z: BigUint = Zero::zero();
let o: BigUint = One::one();
......@@ -42,4 +42,19 @@ pub fn compute(m: &BigUint, n: &BigUint) -> i32 {
compute(n, m)
}
}
}
\ No newline at end of file
}
// fn zstar(N: &BigUint) {
//
// }
// pub fn astar(N: &BigUint) -> Vec::<BigUint> {
// let o: BigUint = One::one();
// let mut result = Vec::from_iter(&o..N);
// for x in result {
// if compute(&x,N) != 1 {
// }
// };
// return result
// }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment