Skip to content

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

@akpeker

Description

@akpeker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpure python version onlyThe bug does not exist on the Rust version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions