Repository navigation
feat(libc): implement _Divide, _FDivide, _Recip and _FRecip - #10787
Conversation
Progress report (50a4f82 → 72583a0)📈 System libraries: 48.87% (+0.01%, +4 implemented functions) ✅ 4 implemented
Changed libraries (implemented exports)
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head 5ae2d41. The four helpers are narrowly scoped IEEE division/reciprocal wrappers, declarations are in the canonical API header, and the console-specific floating-point gaps are recorded in libc debt. Locally, both changed C++ translation units compile with GCC 12.2 using -Wall -Wextra -Werror; a focused harness linked to the exact implementation and passed quotient, signed-zero, infinity, and NaN cases. diff --check and the current-main conventions check pass. I could not configure the integrated libc test target locally because this environment lacks SDL2/XRandR development support; the PR reports its focused CTest run, and the hosted conventions/intake checks pass. The remaining console-specific behavior is explicitly unverified in the debt entry.
5ae2d41 to
c777042
Compare
|
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.
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
The new head differs from the previously reviewed commit only by removing trailing blank lines in the implementation and test files; no executable code or test assertions changed. I rechecked the exact head, git diff --check, and the conventions checker (all pass). The prior GCC 12.2 -Wall -Wextra -Werror compile and focused exact-source harness remain applicable to the unchanged code. Hosted eligibility, conventions, labels, report, Ubuntu/Windows relinker, ASAN, Ubuntu register-context and macOS write-watch checks pass; macOS relinker and Intel register-context checks are still queued, and product jobs are path-skipped.
c777042 to
72583a0
Compare
|
@MarcZX10 I rebased this onto current main |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the rebased head 72583a0b20ceb65ebaf630775ce9c0e42137a625. The four wrappers use native IEEE division/reciprocal operations, and the tests cover finite values, signed zero, infinities and NaNs; the remaining console/FENV uncertainty is recorded in debt. The PR reports 3/3 focused Linux tests on this head. Current hosted relinker, ASAN, register-context and write-watch jobs pass; platform product jobs are skipped. git diff --check against current main is clean, and the hosted conventions check passes. I also manually checked the #10345 overlap: it changes the fmod/fmodf debt entry, with no implementation/export duplication; preserve both debt entries if the adjacent documentation hunk conflicts during merge.
What
Add
_Divide,_FDivide,_Recipand_FRecip, the double and float Dinkumware division and reciprocal helpers. They use IEEE division and reciprocal semantics; tests cover quotients, signed zero, signed infinity, NaN and infinity operands. Exact console results, signaling-NaN handling and floating-point exception behavior remain unverified and are recorded in the libc debt entry.The declarations live in
Api.hpp; no other open PR implements these four exports.Tested
Linux CachyOS 7.3.0-2-cachyos, GCC 16.2.1. Base
upstream/mainbd8e13428a; head72583a0b20.The approved commit
5ae2d41c23differs from the pre-rebase headc777042410only by the removal of two trailing blank lines at the ends of the source and test files. Rebased after main advanced: the only conflict was the adjacent_FSinh/_FCoshdebt entry; main's measured version and this PR's division entry are both preserved, and no code or test statements changed.cmake --build build --target guest_dinkumware_internals_tests guest_math_tests guest_math_exact_tests libs --parallel 8: passed.ctest --test-dir build -R '^(guest_dinkumware_internals|guest_math|guest_math_exact)$' --output-on-failure: 3/3 passed.guest_dinkumware_internalscovers double and float division and reciprocal results, signed zero, signed infinity, NaN and infinity operands.guest_mathandguest_math_exactare the neighboring libm suites and pass unchanged.tools/check_conventions.py --base upstream/main --head HEADandgit diff --check: clean.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)