Skip to content

multipleOf does not work well when parameter is float #79

@leiserfg

Description

@leiserfg

Some schemas make use of multipleOf for limiting the numbre of decimal valid for a value, like multipleOf 0.01 for currency. But the check used by this lib usually fails:

19.01/0.01 
>>>   1901.0000000000002

The easier way to fix it is by using Decimal if you are fine with my solution I can make a pr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions