Skip to content
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

[5.4] Proper float comparison in ratio validation #17963

Merged
merged 1 commit into from
Feb 17, 2017
Merged

[5.4] Proper float comparison in ratio validation #17963

merged 1 commit into from
Feb 17, 2017

Conversation

vlakoff
Copy link
Contributor

@vlakoff vlakoff commented Feb 17, 2017

Spotted this while reading #17943.

One does not simply directly compare floats for equality.
There are countless articles about this, and a big warning here.

5-digit precision is needed to detect a 1px mismatch in a 122880x69120 128K image.
I chose 6-digit precision, it costs nothing more and it adds a safety margin.

Maybe this change would have to be backported as well.
ping @themsaid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants