-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Clang Compiler warning: [-Wfloat-equal] #2848
Comments
A PR to silence this warning would be welcome. |
As it stands today in the current implementation, it does not look like you are doing very accurate floating point comparison. Such comparison is much more complicated, and would require a lot more code, similar to what boost.Math is doing for example. Let me know if just silencing the warning is ok, or if you intend to have very accurate floating point comparison. |
It is not a comparison but a fallback implementation of |
Suppressed this false positive in ef54f9a. |
Sorry, but you only partially solved the problem:
Additionally, not in the API, but in a test file:
|
In general fixing all possible warnings is a non-goal but a PR similar to ef54f9a would be welcome. You can also suppress warnings with |
please consider disabling the warning in fmtlib itself or defining a
float_equal_no_warning
function or similar, or using std::equal_to, or comparing toepsilon
, etc.The text was updated successfully, but these errors were encountered: