You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_math: new acospi test cases exceed the 5-ulp tolerance on NetBSD, OpenBSD and DragonFly #154146
These platforms have no acospi() in libm, so the fallback in Modules/mathmodule.c is used. It computes via acos(), and these libms (a shared old fdlibm lineage — hence the identical results) lose precision in acos(x) for x close to 1. The same fallback passes on FreeBSD and OpenIndiana, whose acos() is accurate.
Possible fixes: compute the fallback near 1 through the half-angle identity acospi(x) = 2*asinpi(sqrt((1-x)/2)), which avoids the inaccurate region of acos(); or relax the tolerance for these platforms.
Activity
gh-154146: Fix accuracy of the math.acospi() fallback near 1 (GH-154148)