-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Tests added for mixed type arithmetic operations #25671
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
Conversation
modules/core/test/test_arithm.cpp
Outdated
| } | ||
| double getMaxErr(int depth) | ||
| { | ||
| return depth <= CV_32S ? 2 : depth < CV_64F ? 1e-5 : 1e-12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this part of code wasn't actually changed, it's inherited from previous commit
It's 2 everywhere where multiplication/division is performed
It can be safely dropped to 1 at least on my machine (will check it on CI)
I guess this threshold was tuned to actual accuracy level sometime in the past
Changes
Note: div-by-zero values are removed from checking since the result is implementation-defined in common case
getMulExtTab()function that lead to dead codePull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.