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

alphabet: handle large ratio of alphabet to seps #30

Merged
merged 1 commit into from
Apr 17, 2021
Merged

alphabet: handle large ratio of alphabet to seps #30

merged 1 commit into from
Apr 17, 2021

Conversation

ethomson
Copy link
Contributor

@ethomson ethomson commented Aug 2, 2020

When using a custom alphabet, there may be a large ratio of alphabet
characters to separator characters. When the ratio is larger than 3.5,
the alphabet and separators are adjusted.

However, if we use integer arithmetic, we may not do the adjustment when
the ratio is > 3.5 but < 4. Use floating point arithmetic to do this
comparison.

Include a test where the ratio of alphabet characters to separator
characters is 3.714.

When using a custom alphabet, there may be a large ratio of alphabet
characters to separator characters.  When the ratio is larger than 3.5,
the alphabet and separators are adjusted.

However, if we use integer arithmetic, we may not do the adjustment when
the ratio is > 3.5 but < 4.  Use floating point arithmetic to do this
comparison.

Include a test where the ratio of alphabet characters to separator
characters is 3.714.
@ullmark
Copy link
Owner

ullmark commented Aug 10, 2020

@ethomson Thanks for the PR, I'll have a look! 👍

@manigandham manigandham merged commit 7f6e31b into ullmark:master Apr 17, 2021
@manigandham manigandham self-assigned this Nov 18, 2021
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.

None yet

3 participants