-
Notifications
You must be signed in to change notification settings - Fork 47
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
Specialized asserts for floating point tests #272
Comments
Right. This is a good suggestion. One would wish it was possible to get at the non-preprocessed source, but I assume that is not possible. Or at least not in a portable fashion. Todo:
|
Judging from these docs, it looks like C99 introduced a number of "comparison and classification" functions. Of these, |
We could implement them one by one, we don't have to batch them together in implementation. But probably should have all implemented when we release a version with them officially supported though. |
I have a test that looks like:
When this test fails, I get something like this on macOS using Clang 12 installed with MacPorts:
so apparently isinf is implemented using a macro in this case. To avoid this kind of line noise, it might be a good idea to add specialized floating point asserts like:
etc., with output along the lines of:
The text was updated successfully, but these errors were encountered: