[libc-commits] [libc] [libc] Fix incomplete sincos_test. (PR #97174)

via libc-commits libc-commits at lists.llvm.org
Sat Jun 29 11:40:06 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (lntue)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/97174.diff


1 Files Affected:

- (modified) libc/test/src/math/sincos_test.cpp (+7-9) 


``````````diff
diff --git a/libc/test/src/math/sincos_test.cpp b/libc/test/src/math/sincos_test.cpp
index c0cbff7084d19..7e06456f2e05c 100644
--- a/libc/test/src/math/sincos_test.cpp
+++ b/libc/test/src/math/sincos_test.cpp
@@ -103,18 +103,16 @@ TEST_F(LlvmLibcSincosTest, TrickyInputs) {
 }
 
 TEST_F(LlvmLibcSincosTest, InDoubleRange) {
-  constexpr uint64_t COUNT = 123'451;
+  constexpr uint64_t COUNT = 123'41;
   uint64_t START = LIBC_NAMESPACE::fputil::FPBits<double>(0x1.0p-50).uintval();
   uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits<double>(0x1.0p200).uintval();
   uint64_t STEP = (STOP - START) / COUNT;
 
-  auto test = [&](mpfr::RoundingMode rounding_mode) {
-    for (uint64_t i = 0, v = START; i <= COUNT; ++i, v += STEP) {
-      double x = FPBits(v).get_val();
-      if (isnan(x) || isinf(x))
-        continue;
+  for (uint64_t i = 0, v = START; i <= COUNT; ++i, v += STEP) {
+    double x = FPBits(v).get_val();
+    if (isnan(x) || isinf(x))
+      continue;
 
-      ASSERT_SINCOS_MATCH_ALL_ROUNDING(x);
-    }
-  };
+    ASSERT_SINCOS_MATCH_ALL_ROUNDING(x);
+  }
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/97174


More information about the libc-commits mailing list