Skip to content

Commit b8450d4

Browse files
authored
[libc] Fix incomplete sincos_test. (llvm#97174)
1 parent 9ea9e71 commit b8450d4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

libc/test/src/math/sincos_test.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,16 @@ TEST_F(LlvmLibcSincosTest, TrickyInputs) {
103103
}
104104

105105
TEST_F(LlvmLibcSincosTest, InDoubleRange) {
106-
constexpr uint64_t COUNT = 123'451;
106+
constexpr uint64_t COUNT = 123'41;
107107
uint64_t START = LIBC_NAMESPACE::fputil::FPBits<double>(0x1.0p-50).uintval();
108108
uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits<double>(0x1.0p200).uintval();
109109
uint64_t STEP = (STOP - START) / COUNT;
110110

111-
auto test = [&](mpfr::RoundingMode rounding_mode) {
112-
for (uint64_t i = 0, v = START; i <= COUNT; ++i, v += STEP) {
113-
double x = FPBits(v).get_val();
114-
if (isnan(x) || isinf(x))
115-
continue;
111+
for (uint64_t i = 0, v = START; i <= COUNT; ++i, v += STEP) {
112+
double x = FPBits(v).get_val();
113+
if (isnan(x) || isinf(x))
114+
continue;
116115

117-
ASSERT_SINCOS_MATCH_ALL_ROUNDING(x);
118-
}
119-
};
116+
ASSERT_SINCOS_MATCH_ALL_ROUNDING(x);
117+
}
120118
}

0 commit comments

Comments
 (0)