-
Notifications
You must be signed in to change notification settings - Fork 185
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
Compiler error Werror=float-equal during build #4375
Comments
Thanks for bringing this to our attention @geiseri! There are some of those comparisons that we can change but a few that we need. The right solution will be for us to disable the warning on all compilers, which we will get done in the next couple weeks and let you know. In the meantime, I hope you can disable the warnings on your build. |
Cool! Yeah, the float comparison thing seems to be one of those things that doesn't matter until it does. You would know better than me, but cursory look most of them are a zero or not zero check. The ones related to tile range overlaps concern me, just because there can be legitimate reasons to have very close floating point numbers. I would expect you to have better insight as to what the conditions are. As to disabling warnings, I tend to use |
So as not to confuse the practical advice Luc gave, you'll want to compile TileDB at present with The larger issue is rather more subtle. A number of the comparisons that are bringing up warnings are comparisons to exact values of 0.0 and 1.0. These do need to be exact in order to function properly. In some cases, for example, we are doing exact checks in order to deal with the difference between a closed interval and an open one. There's no way to make this kind of check correct with an approximate check.
For a large class of numerical algorithms, such as Newton's method, you really don't want to be testing with exact equality because you can end up with infinite loops because of a closed cycle in a small neighborhood of zero that never actually touches zero. This is the kind of code where turning on the compiler warning is useful. Some of our code, however, is not of this kind. |
Greetings I am on debian 12
I am including TileDB in my project using
FetchContent
in cmake. I setTILEDB_WERROR
toOFF
but I think that flag comes in from my main project.I see the following error during the build:
They seem to be in array_schema
dimention.cc:292
dimension.cc:610
dimension.cc:678
dimension.cc:703
dimension.cc:705
dimension.cc:1621
domain.cc:668
range_subset.h:120
range_subset.h:168
I am not sure if you can cheat with
abs(a-b) < epsilon
for these cases. Since these are boundries they could get nailed on small numbers.The text was updated successfully, but these errors were encountered: