Skip to content

Potential precision loss formatting decimals, integers, and strings #18

@ScrimpyCat

Description

@ScrimpyCat

These issues all stem from the different formatters converting the value to a float before formatting it. I'm not sure if this is something you want the library to handle however. If you did want to alleviate the problem converting everything to Decimal and changing the functions to use that instead would be the easiest solution (though would mean Decimal would need to be a required dependency). If you don't want Decimal as a required dependency, then the other way to solve it would probably be to introduce a new conversion type that respects precision (a string or some format based on integers) and then operating on that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions