Repository navigation
feat(libc): implement nextafter and tgammaf exports - #1806
Closed
Prophet069 wants to merge 1 commit into
Closed
Prophet069 wants to merge 1 commit into
Prophet069 wants to merge 1 commit into
Conversation
9 tasks done
7 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
This was referenced Oct 9, 2026
Collaborator
|
Closing: no title is shown to reach |
ycbuzi
pushed a commit
to ycbuzi/AnyPS5
that referenced
this pull request
Oct 10, 2026
… exports Harvested from upstream (closed unmerged); library completion 2916/3290 -> 2918/3292. Additive conflicts resolved by keeping both sides: core/libs/prx/libc/CMakeLists.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011krDVCnnMQPaEFEqCDnKmA
This was referenced Oct 10, 2026
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
Add the missing
nextafterf,nextafterandtgammaflibc exports. Titles importing these functions currently fail import resolution because their NIDs are absent from the built library.The exports delegate to the matching float/double overloads of
std::nextafterandstd::tgamma, following the existingMath.cppconvention. Each usesextern "C",APS5_VABIand the_nid_postfixnaming mechanism. No fallback values, title-specific behavior or new dependencies are introduced.Add
guest_math_exports, a CTest regression test for neighboring IEEE-754 values, equal arguments, signed zeros, subnormals, NaNs, infinities, gamma values, poles, domain errors and overflow/underflow. Floating-point exception and errno checks follow the host's advertisedmath_errhandlingcapabilities.This PR contains only the three exports, their behavior test and its CMake registration. It is independent of the subsequent local developments.
Tested
Windows x86-64, MinGW-w64 GCC 15.2.0 UCRT, Release, CMake/Ninja. Built the full
libctarget,guest_math_exports_tests,guest_math_testsandnid_patcherfrom this PR's separate worktree, using at most four parallel jobs. Bothguest_math_exportsandguest_mathpassed; individual test durations were 0.12 s and 0.03 s.Patched the freshly built
libc.prxwith the project's NID patcher and independently verified all three PE exports:nextafterf:3m2ro+Di+Cknextafter:h+J60RRlfnktgammaf:B2ZbqV9geCMReviewed ABI declarations: Windows uses the existing System-V
APS5_VABIbridge; Linux uses its native System-V ABI. The implementation and regression test use portable C++20 facilities. Linux compilation and runtime tests were not performed because no usable Linux environment is available on this host; Linux CI validation remains outstanding. No converted title was started for this PR validation.The official
tools/check_conventions.py --base origin/maincheck was run with the planned title and this description supplied through--titleand--body. It passed. The complete three-file diff was reviewed andgit diff --check origin/main...HEADpassed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)