File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -31,22 +31,26 @@ TEST_F(LlvmLibcAsinTest, SpecialNumbers) {
3131
3232using namespace LIBC_NAMESPACE ::testing;
3333
34+ // With FTZ/DAZ flags are set, when the inputs are denormal, the output bit
35+ // pattern might not be exactly 0, but they should all be equal to 0 as floating
36+ // points.
37+
3438TEST_F (LlvmLibcAsinTest, FTZMode) {
3539 ModifyMXCSR mxcsr (FTZ);
3640
37- EXPECT_FP_EQ (zero, LIBC_NAMESPACE::asin (min_denormal));
41+ EXPECT_TRUE (zero == LIBC_NAMESPACE::asin (min_denormal));
3842}
3943
4044TEST_F (LlvmLibcAsinTest, DAZMode) {
4145 ModifyMXCSR mxcsr (DAZ);
4246
43- EXPECT_FP_EQ (zero, LIBC_NAMESPACE::asin (min_denormal));
47+ EXPECT_TRUE (zero == LIBC_NAMESPACE::asin (min_denormal));
4448}
4549
4650TEST_F (LlvmLibcAsinTest, FTZDAZMode) {
4751 ModifyMXCSR mxcsr (FTZ | DAZ);
4852
49- EXPECT_FP_EQ (zero, LIBC_NAMESPACE::asin (min_denormal));
53+ EXPECT_TRUE (zero == LIBC_NAMESPACE::asin (min_denormal));
5054}
5155
5256#endif
You can’t perform that action at this time.
0 commit comments