societe-generale/core-nlg

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

Opened this issue · 2 comments

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

The problem only exist if numbers are in decimal format.

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