feat(libc): export nextafter double math function #7874
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7874"
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 ErenYeager1836 on 2026-10-19T11:56:00Z.
What
Export
nextafter_nid_postfix(double x, double y)incore/libs/prx/libc/src/Math.cppdelegating directly tostd::nextafter(double, double).Fixes part of #7624, unblocking unresolved import
h+J60RRlfnkin PPSA26578 (Unity/IL2CPP).Tested
core/libs/tests/GuestMath.cpp:+0.0and-0.00.0\pm\inftypython tools/check_conventions.pypasses 100%.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 repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:56:45Z.
Progress report (
6762694→6487d5e)➖ System libraries: 82.17% (+0.0%, +1 implemented functions)
✅ 1 implemented
nextafter_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T12:10:02Z.
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.
main)core/libs/prx/libc/src/Math.cppL530core/libs/tests/GuestMath.cppL109, L1145nextafter_nid_postfixSome 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.
core/libs/tests/GuestMath.cppcore/libs/prx/libc/src/Math.cppcore/libs/tests/GuestMath.cppcore/libs/prx/libc/src/Math.cppcore/libs/prx/libc/src/Math.cppcore/libs/prx/libc/src/Math.cppcore/libs/tests/GuestMath.cppImported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:25:06Z.
Review: COMMENTED
The implementation in
core/libs/prx/libc/src/Math.cppand unit test assertions incore/libs/tests/GuestMath.cppare clean and correct:nextafter_nid_postfixmaps directly tostd::nextafter(double, double).GuestMath.cpp.guest_math_tests.exelocally with MinGW-w64 GCC 15.2.0 (Release) and verifiedguest_mathCTest passes in 0.05s.The CI
conventionsworkflow failed because the PR description omitted the template sections from.github/pull_request_template.md. Adding### Testedand### Checklistto the PR description will clear the failure:Currently,
core/libs/prx/libc/src/Math.cppimplementsnextafterf(float). This exports the double-precision variantnextafter:double APS5_VABI nextafter_nid_postfix(double x, double y)delegating tostd::nextafter(double, double).GuestMath.cppverifying normal steps, denormals, infinities, quiet NaNs, and negative zero behavior.Fixes part of #7624.
Tested
Windows 11, MinGW-w64 GCC 15.2.0 (Release). Built
guest_math_testsand verifiedguest_mathCTest passes.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)Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-19T13:44:20Z.
Thanks for the verification @fogydes! Updated the PR description with the required
### Checklistand### Testedsections. Conventions CI is now passing green.