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

Wrong formula for index? #2

Closed
dkales opened this issue Aug 10, 2020 · 1 comment · Fixed by #3
Closed

Wrong formula for index? #2

dkales opened this issue Aug 10, 2020 · 1 comment · Fixed by #3
Labels
bug Something isn't working

Comments

@dkales
Copy link

dkales commented Aug 10, 2020

The order of operations in code at

(h1.wrapping_add(k_i).wrapping_mul(h2) % self.optimal_m) as usize

does not seem to agree with the formula in the blog post g_i(x) = h_1(x) + i*h_2(x).

@onatm
Copy link
Member

onatm commented Aug 10, 2020

Thank you for spotting this issue @dkales - Do you want to create a PR for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants