[libc-commits] [libc] [llvm] [libc][math][c23] implement double-precision asinpi (PR #188158)
via libc-commits
libc-commits at lists.llvm.org
Wed Mar 25 11:52:11 PDT 2026
================
@@ -63,6 +63,45 @@ LIBC_INLINE double asin_eval(double u) {
return fputil::polyeval(u4, d0, d1, d2);
}
+// Coefficients for the polynomial approximation of asin(x)/(pi*x) on [0, 0.5].
+// Generated by Sollya:
+// > prec = 200;
+// > g = asin(x) / (pi * x);
+// > P = fpminimax(g, [|0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22|],
+// > [|D...|], [0, 0.5]);
+LIBC_INLINE_VAR constexpr double ASINPI_COEFFS[12] = {
----------------
lntue wrote:
Can you add the estimated relative errors to the comments?
https://github.com/llvm/llvm-project/pull/188158
More information about the libc-commits
mailing list