[libc-commits] [libc] Capture 'x' by reference in asinpi_polyeval lambda (PR #164404)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 21 05:08:37 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Ren Hiyama (renhiyama)
<details>
<summary>Changes</summary>
Closes #<!-- -->164403
---
Full diff: https://github.com/llvm/llvm-project/pull/164404.diff
1 Files Affected:
- (modified) libc/src/math/generic/asinpif16.cpp (+1-1)
``````````diff
diff --git a/libc/src/math/generic/asinpif16.cpp b/libc/src/math/generic/asinpif16.cpp
index aabc0863ba527..395f4c4ebc070 100644
--- a/libc/src/math/generic/asinpif16.cpp
+++ b/libc/src/math/generic/asinpif16.cpp
@@ -77,7 +77,7 @@ LLVM_LIBC_FUNCTION(float16, asinpif16, (float16 x)) {
};
// polynomial evaluation using horner's method
// work only for |x| in [0, 0.5]
- auto asinpi_polyeval = [](double x) -> double {
+ auto asinpi_polyeval = [&](double x) -> double {
return x * fputil::polyeval(x * x, POLY_COEFFS[0], POLY_COEFFS[1],
POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);
``````````
</details>
https://github.com/llvm/llvm-project/pull/164404
More information about the libc-commits
mailing list