Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Apr 28, 2023
2 parents 24c6410 + d2d685c commit f36cd4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/mathutiltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ TEST_F(MathUtilTest, Denormal) {
// and not by the pre-processor. In case of clang >= 15 the pre-processor flushes to
// zero with -ffast-math enabled.
volatile float fDenormal = std::numeric_limits<float>::min();
fDenormal /= 2.0f;
fDenormal = fDenormal / 2.0f;
EXPECT_NE(0.0f, fDenormal);

volatile double dDenormal = std::numeric_limits<double>::min();
dDenormal /= 2.0;
dDenormal = dDenormal / 2.0;
EXPECT_NE(0.0, dDenormal);

_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);

fDenormal = std::numeric_limits<float>::min();
fDenormal /= 2.0f;
fDenormal = fDenormal / 2.0f;
EXPECT_EQ(0.0f, fDenormal);

dDenormal = std::numeric_limits<double>::min();
dDenormal /= 2.0;
dDenormal = dDenormal / 2.0;
EXPECT_EQ(0.0, dDenormal);

#endif
Expand Down

0 comments on commit f36cd4f

Please sign in to comment.