diff options
| author | Ren Hiyama <renhiyama@rovelstars.com> | 2025-10-21 20:10:00 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-21 10:40:00 -0400 |
| commit | fedbb0f7e1e2e89743f7e19e54cda228fe2e65ef (patch) | |
| tree | 6be9c8185c39fe4ae5e3f78634536028f1b77299 | |
| parent | 1e99026b45b048a52f8372399ab83d488132842e (diff) | |
[libc] Capture 'POLY_COEFFS' by reference in asinpi_polyeval lambda. (#164404)
Closes #164403
GCC fails to compile libc currently. This PR fixes this by capturing
'POLY_COEFFS' by reference.
| -rw-r--r-- | libc/src/math/generic/asinpif16.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/src/math/generic/asinpif16.cpp b/libc/src/math/generic/asinpif16.cpp index aabc0863ba52..395f4c4ebc07 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]); |
