-
-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Float operations can lead to a false fail of multipleOf
#810
Comments
Hi there, thanks! If you want fixed point precision (or generally non-float behavior), you should use |
Okay, thanks. I guess that's the solution, then. Keep up the good work! |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, much ❤️ to the library.
I found this validation problem when using
multipleOf
:When printing the cotient that results from this code:
https://github.com/Julian/jsonschema/blob/0ea12edea319580473bda7e26ef088ff3a0983c5/jsonschema/_validators.py#L169
The cotient is 100.99999999999999
Therefore,
int(quotient)
can't bequotient
on https://github.com/Julian/jsonschema/blob/0ea12edea319580473bda7e26ef088ff3a0983c5/jsonschema/_validators.py#L171What to do?
The text was updated successfully, but these errors were encountered: