Skip to content

multipleOf running into floating point issue #43

Closed
@xjamundx

Description

@xjamundx

We have the use case of wanting to enforce numbers having no more than 2 decimal places so we're using the multipleOf keyword with .01 to try to achieve this. Unfortunately it fails in unexpected ways.

There is a well known issue with multipleOf keyword when used with floating point numbers:

Do you think this is something that this parser would like to fix or should we just use strings with regexes to achieve a similar result?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions