You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[0.7012920012119436, 0.7012920012119435]
is empty: true
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:
[0.7012920012119437, 0.7012920012119437]
is empty: false
My compiler info is
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
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:
zfergus
changed the title
Cosine rounding failure with Clang
Cosine rounding failure on macOS
Feb 28, 2020
Debugging some more, I wanted to verify it would work for GCC on my mac. Using g++-9 (Homebrew GCC 9.2.0_3) 9.2.0, I still get the same rounding failure:
[0.7012920012119436, 0.7012920012119435]
is empty: true
Could this be a problem with the hardware implementation of the trignometric functions? Is it guaranteed that FE_DOWNWARD cos(theta) < FE_UPWARD cos(theta)?
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: