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

Removing trailing zero not working if "dec" is not set #2

Open
FabienGiely opened this issue Oct 31, 2019 · 2 comments
Open

Removing trailing zero not working if "dec" is not set #2

FabienGiely opened this issue Oct 31, 2019 · 2 comments
Labels
good first issue Good for newcomers

Comments

@FabienGiely
Copy link
Contributor

In the helper.number fonction, if "dec" is not set, remove_trailing_zero option is not working

@FabienGiely
Copy link
Contributor Author

The problem only exist if numbers are in decimal format.

@FabienGiely
Copy link
Contributor Author

There are no ways to know the "true" decimals of a number,
For example :

print(Decimal(1.12))
>>1.12000000000000010658141036401502788066864013671875

One option is, when "dec" is not set, to have a default dec value

@printfhere printfhere added the good first issue Good for newcomers label Nov 13, 2019
FabienGiely pushed a commit to FabienGiely/core-nlg that referenced this issue Jun 11, 2021
…_interpret

add no contract on no_interpret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants