-
Notifications
You must be signed in to change notification settings - Fork 45
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
Cosine rounding failure on macOS #25
Comments
Debugging some more, I wanted to verify it would work for GCC on my mac. Using
Could this be a problem with the hardware implementation of the trignometric functions? Is it guaranteed that |
At this point, I have run it on five different machines:
All compiled with GCC (of different versions ranging from 7 to 9). |
Does this have any relation to #13? |
I don't think so, #13 was a compilation error if you did not specify the right rounding policy. This error is related to how the trigonometric functions are rounded using hardware rounding. We published a research article benchmarking various C/C++ interval arithmetic libraries. In it we found that the hardware rounding of transcendental functions is broken on certain platforms. We concluded filib to be the overall fastest and reliable library. You can read the full paper here. |
I am running into issues with the interval library when compiling with Clang. This is the simple failure case:
The output when compiled with clang is:
You can see that the last digit was rounded improperly resulting in an empty interval. If I try the same case but use
rounded_transc_exact
for the rounding policy It works as expected:My compiler info is
and the example is compiled in debug mode. The examples works fine on GCC (specifically I tested on
gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
)Is this an expected failure for Clang?
The text was updated successfully, but these errors were encountered: