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

Billions followed by millions (e.g. 1,025,000,000) not converted for English, French #95

Closed
akpeker opened this issue Jul 19, 2023 · 0 comments
Labels
bug Something isn't working python version only The bug does not exist on the Rust version

Comments

@akpeker
Copy link

akpeker commented Jul 19, 2023

When the next multiplier is a million, following billions, it is not handled correctly. It is not detected as an expected valid multiplier. There is a "TODO" comment in the related code, I suspect it is about this issue.

It doesn't happen with Spanish because in Spanish billion is basically "thousand millions".

If the next multiplier following billions is a thousand, it works fine, because 1000x1000=1,000,000 < 1 billion.

For now, I add the following check to the end of is_coef_appliable() method, before returning False, it works fine for me now:

        if coef > self.grp_val and coef * self.grp_val < self.n000_val:
            return True

It seems reasonable to me, but I may not be able to consider all possible cases, and for different languages. Just a suggestion for the time being.

@akpeker akpeker changed the title Billions followed by millions (e.g. 1,025,000,000) not converted for English Billions followed by millions (e.g. 1,025,000,000) not converted for English, French Jul 19, 2023
@rtxm rtxm added bug Something isn't working python version only The bug does not exist on the Rust version labels Aug 14, 2023
@rtxm rtxm closed this as completed in 8f947ff Aug 14, 2023
rtxm added a commit that referenced this issue Aug 14, 2023
Fixed a bug in the handling of the multipliers. Fixes #95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python version only The bug does not exist on the Rust version
Projects
None yet
Development

No branches or pull requests

2 participants