Repository navigation
fix(libc): store the sign of gamma in an exported signgam from lgamma - #6318
Merged
oneandonlydean merged 1 commit intoOct 17, 2026
Merged
Conversation
This was referenced Oct 15, 2026
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This was referenced Oct 15, 2026
Closed
11 tasks done
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hypermoist
force-pushed
the
fix/libc-lgamma-signgam
branch
from
October 16, 2026 03:15
0a53092 to
20edd07
Compare
Contributor
Author
|
Rebased onto current 🤖 Generated with Claude Code |
|
Windows run (Windows 11 build 26300, non-elevated, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
Not covered: the full build, and the patched/NID-renamed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
lgammareturned the host's value but never stored the sign of Γ(x), because libc exported nosigngam. The debt entry indocs/dev/debt/libc.mdrecorded this.libc now exports
signgam(NID5gOOC0kzW0c, from the aerolib symbol list), starting at 0 as in FreeBSD 11'ss_signgam.c.lgammasets it by the rules of FreeBSD 11'se_lgamma_r.c:sin_pi(x)), 1 otherwise.The returned value is unchanged; it is still the host's
lgamma.Overlap: #5775 rewrites the same
lgammaline, to handle subnormal arguments on Windows. Whichever merges second needs a trivial rebase that keeps both the subnormal branch and thesigngamstore.Tested
CachyOS Linux (kernel 7.2.9), GCC 16.2.1, Release, on
main8856f18.guest_mathchecks the stored sign for positive values, ±0, -0.5, -1.5, -2.5, a tiny negative, negative integers including -2^60, a value just above -2^52, ±inf and NaN.lgamma_rover 2,000,000 values in [-200, 200], including integers and values scaled by 2^-70. There were 0 mismatches outside the negative-integer poles, where glibc and FreeBSD intentionally differ.guest_math.tools/check_conventions.py --base origin/mainpasses.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)🤖 Generated with Claude Code