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

get_divisors(2) evaluates to [2] #1

Open
elWanderero opened this issue May 24, 2020 · 1 comment
Open

get_divisors(2) evaluates to [2] #1

elWanderero opened this issue May 24, 2020 · 1 comment

Comments

@elWanderero
Copy link

elWanderero commented May 24, 2020

According to the documentation n itself should not be a member of get_divisors(n). But get_divisors(2) evaluates to [2] when it should evaluate to []. This holds for 2u8, 2u16, 2u32, 2u64, 2u128 and 2usize.

Tested with divisors v0.2.1 and rustc 1.43.1

@jh05013
Copy link

jh05013 commented Mar 29, 2024

Since this repo has not been maintained since 2019, I made a new crate based on this to fix the bug, as well as using the proper definition of divisors to include 1 and n:

https://crates.io/crates/divisors_fixed

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

2 participants