Skip to content

Calculate prices in cent integers #52

Open
@lukasdenk

Description

Since floats are mathmatically uncountable, Python does not always calculate them correctly. This problem occurs, e.g. with some prices in the FMIParser.
E.g.:

Python Console
4.6+0.8
5.3999999999999995

Solution:

Calculate prices in cents. Then format them to a string containing the euro-format.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions