Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about check composite #5

Open
oovm opened this issue May 6, 2023 · 0 comments
Open

Question about check composite #5

oovm opened this issue May 6, 2023 · 0 comments

Comments

@oovm
Copy link

oovm commented May 6, 2023

Why not return !is_prime here, when would third branch happens?

num-primes/src/lib.rs

Lines 194 to 206 in 5a75765

pub fn is_composite(n: &BigUint) -> bool {
let x: bool = is_prime(n);
if x == true {
return false
}
else if x == false {
return true
}
else {
panic!("An Error Has Occured On Checking Composite Number");
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant