fix(libc): compute atan2l with FreeBSD msun's e_atan2l.c #19328
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19328"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlfaRojo on 2026-11-13T03:44:27Z.
What
atan2lreturned the host'sstd::atan2. It now follows FreeBSD msun'se_atan2l.c(release/11.4.0, ld80 constants frominvtrig.c) on top of the existing msunatanl: signed zeros, infinities,x = 1, the huge and tinyy / xbranches and the quadrant corrections follow the source, so the last bits match msun where the host libm differs.docs/dev/debt/libc.mddropsatan2lfrom the host-math list and records the new entry.Tested
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7, Release, no title or homebrew run.
guest_math(newCheckAtan2l): onmainit fails withGuest atan2l failed for 0x8p-3, 0xep+0; with the changectest -R '^guest_math'passes 3 of 3, three runs (guest_math,guest_math_elementary,guest_math_exact).e_atan2l.cands_atanl.cwith the raw decimal constants, not from the host libm. It matched the port bit for bit on a 601x601 integer grid (361k inputs) and at 53-bit precision. The pinned cases include inputs where the host libm differs, the exponent-difference thresholds, a subnormaly, signed zeros, infinities and NaN.libc.prx: no title binary was available, so the console's ownatan2lis not compared (stated in the debt entry).tools/check_conventions.py --base upstream/main: 0 errors.tools/pr_overlap.pyreports line overlap inMath.cppwith #18513 and #18694 and could not complete the comparison for PRs that conflict withmain. #18481, #18513, #18525 and #18694 are neighbours editing the same files or list line; none definesatan2l(checked withgh pr diff; #18694 only keepsatan2lin the host-math list). Every PR the tool could not confirm was also grepped for addedatan2llines withgh pr diff: none.b16c2b5725(merged with upstream/main51790c7533):guest_math,guest_math_elementaryandguest_math_exact, all three test executables rebuilt, pass in 3/3 runs;check_conventions.py --base upstream/mainreports no errors.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)