Skip to content

Be smarter about types when calculating mean edit distance to avoid a bug that might be an overflow#52

Merged
sts10 merged 2 commits intomainfrom
mean_edit-distance_bug
Nov 22, 2023
Merged

Be smarter about types when calculating mean edit distance to avoid a bug that might be an overflow#52
sts10 merged 2 commits intomainfrom
mean_edit-distance_bug

Conversation

@sts10
Copy link
Copy Markdown
Owner

@sts10 sts10 commented Nov 22, 2023

I believe this fixes #44. When I run cargo run --release -- -AAA NSA-RandPassGenerator-wordlist.txt (this file), instead of getting a negative number for mean edit distance, we get a much more plausible result of 7.719.

The only remaining issue I have is I'm not 100% why it fixes the issue. The only significant change is that we use f64s from the start of the function. But maybe that's enough?

@sts10 sts10 changed the title Mean edit distance bug Be smarter about types when calculating mean edit distance to avoid a bug that might be an overflow Nov 22, 2023
@sts10 sts10 merged commit 06436d5 into main Nov 22, 2023
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

Successfully merging this pull request may close these issues.

On very long lists, mean edit distance can be negative

1 participant