Repository navigation
Conversation
|
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.
I reviewed exact head 1977b6b. The msun port and test additions look carefully scoped; the exhaustive comparisons against three shipped libc.prx copies are strong evidence, including the documented FMA-contracted exception. The current-main sync check is a clean merge (1 ahead/25 behind), and exact-head git diff --check plus tools/check_conventions.py --base upstream/main pass.
I found one merge blocker required by the repository overlap rule: combining this exact head with open #10007 produces a content conflict in core/libs/tests/GuestMath.cpp (git merge-tree --write-tree reports conflict). The changes are separate functions, but both insert at the same test location. Please agree with #10007’s author which lands first, record the resulting Depends on: #N on the checklist line, and rebase/resolve the second branch. Then rerun guest_math on the resolved head. I attempted a local full-build configure for the focused test, but it stops because SDL2 development files are unavailable here; I did not run a local runtime test. Hosted policy/conventions/intake checks and relinker/register-context/write-watch matrices pass; full Linux/Windows jobs are skipped by path policy.
1977b6b to
5534968
Compare
|
@MarcZX10 thanks, done. Since #10007 is the older PR, it lands first:
On |
MarcZX10
left a comment
There was a problem hiding this comment.
Thanks for resolving #10007 first. I verified this exact head is stacked on 89b9820fee, the pairwise merge with #10007 is clean, the checklist now names Depends on: #10007, and the reported guest_math 3/3 rerun covers the resolved stack. The exact-head diff check passes; conventions reports 0 errors (with an existing/updated debt-length warning on the 1,265-character expf entry). The published exhaustive expf comparisons remain strong evidence for the implementation.
The remaining declared dependencies are still open: #9771, #9841 and #9844. Pairwise merges of this head with them still conflict (respectively in the debt file, GuestMath.cpp, and Math.cpp). The branch is also 3 commits ahead/238 behind current main, with docs/dev/debt/libc.md changed on both sides. Since your checklist already says to rebase after those three land, please do that, resolve the shared hunks, then rerun guest_math and conventions on the final integrated head before approval. The current clean merge with main does not include those dependent PRs.
|
Thanks. Pushed Agreed on the rest: once #9771, #9841 and #9844 land, I'll rebase this onto that |
30036a7 to
38afab9
Compare
|
Linux run at this PR's exact head Arch Linux, kernel 7.2.9, Ryzen 9 7950X, g++ (GCC) 16.2.1 20260810, glibc 2.44, x86-64. Release,
This is the focused test only; no title, console or floating-point exception flags were checked. AI-assisted: yes (Claude Code). |
Additive conflicts with main's newer libc math changes: the debt list keeps both sides' entries (per entry), the GuestMath.cpp test functions and calls from both sides are kept, and Math.cpp keeps both sides' independent changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged current
AI-assisted: yes (Claude Code) |
cdb0de8 to
8f6de6c
Compare
|
Refreshed as Fresh individual Linux qualification passes four groups 3/3 before and after an expected immediate-parent Math negative failure; controls pass and restoration is byte-identical. The requested combined exact #10222/#10226 integration is now tested as private merge Earlier Windows/module reports stay historical; no fresh title/module or Windows run is claimed. AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this; the points below are optional.
What I ran
Reviewed head 86fc4fc9c2f04da5210c6cf23a69aa2f4eed05ce. I did not run build or test commands; the build and test results below are author-reported. I read all six changed files listed in the manifest and the prepared description, commit list, manifest, and diff through repo_read.py. No files were excluded by the manifest.
Results
| Check | Result | Note |
|---|---|---|
| Source and test review | passed | Six changed files read |
| Linux build and focused groups | not run | Reported passed by author |
| Windows focused groups | not run | Reported passed by author |
| Hosted CI | not run | Pending per description |
| Console behavior | not run | Not claimed or verified |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not independently reproduce the reported Linux or Windows builds and focused tests, the pinned differential/trap measurements, or hosted CI. Console execution and helper conformance remain unverified, as the change description and debt note state.
To get this to a good state
Nothing is required.
|
Published CMake-only maintenance at A fresh raw libc/kernel build and four CPU CTests pass, zero skips. Actual provider loading, stable hashes, source compiler flags and registration from the new fragment are verified. Conventions, debt-fold and whitespace checks pass. Full pair merges with #10226, #24306 and #24360 now succeed. The same-base gamma pairs demonstrably conflict in CMake before this change and merge cleanly after it. This removes the expf/gamma CMake conflicts found in the earlier private stack; it does not claim every possible multi-PR combination or the remaining parent/child gamma debt-note conflict is resolved. Verified maintenance evidence — 20 payloads, archive SHA-256 AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing in the inspected changes blocks merging; the focused checks reported for this head pass, with broader platform and console checks still unverified.
What I ran
- No commands or tests were run in this review environment.
- Reviewed head
996aaa42e5f8c7d72bf09031e317b2c9e7228bcf. The description reports a Linux x86-64/GCC 16.2.1 Release Ninja build and four focused tests passing at this head; those are author-reported results, not runs performed here.
Results
| Check | Result | Note |
|---|---|---|
| Source and integration review | passed | Inspected all changed files |
| Focused build and tests | not run | Reported passing by the author |
| Broader platform and console checks | not run | Not covered by this review |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read core/libs/prx/libc/CMakeLists.txt, core/libs/prx/libc/src/Math.cpp, core/libs/prx/libc/src/MathExpf.cpp, core/libs/prx/libc/tests/cmake/guest_expf_environment.cmake, core/libs/tests/GuestExpfEnvironment.cpp, core/libs/tests/GuestMath.cpp, and docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md. All seven changed files listed in the manifest were included and read. I did not run the build or tests, or verify Windows, macOS, console, or title behavior. The review folder’s description.md, commits.md, manifest.json, and diff.patch were read; no files were excluded by the prepared manifest.
To get this to a good state
Nothing is required.
|
Merged current On Linux, all six targeted CTests passed. The AI-assisted: yes |
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The exact head reviewed is f876efc0ef1c529370c6304149e3adb8443e27f4; the changed production implementation and its CMake registration appear consistent with the stated goal, and no concrete blocking defect was found in the code inspected.
What I ran
No build or tests were run in this review. I read the prepared description, commit list, manifest, diff, the full MathExpf.cpp, its CMake source and compile-option registrations, and the test CMake fragment. The changed test source, Math.cpp, and other changed hunks were not read in full.
Results
| Check | Result | Note |
|---|---|---|
| Diff and selected source review | passed | Production expf path inspected |
| Tests | not run | Author-reported validation only |
| Full changed-file review | not run | Several changed files not read |
Findings
Blocking
None in the code inspected.
Non-blocking
None.
Not verified
I did not read core/libs/tests/GuestExpfEnvironment.cpp, the changed portions of core/libs/prx/libc/src/Math.cpp or core/libs/tests/GuestMath.cpp, or docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md. I also did not run build or tests, or independently verify the validation reports in the PR description. These changed files were included in the review manifest; the listed production and test files were included in the prepared review bundle. I did not inspect files.json.
To get this to a good state
Nothing is required.
|
Merged current The failing checks on the previous run were unrelated to this change:
At the new head on Windows 11 with MinGW-w64 GCC 15.2 UCRT r7, Release:
AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head 244f4b5b65b972f7c16eb2a34a7ff2feff304bee from the prepared diff and pinned repository reader. No build or tests were run in this review.
Results
| Check | Result | Note |
|---|---|---|
| Diff and source review | passed | Seven changed files read |
| Build and tests | not run | Relied on author-reported validation |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports Linux tests and differential checks at earlier named revisions; those results were not reproduced here. Windows, console, and full patched SDK behavior at this exact head were not verified. The full text of all seven changed files was available and read; no changed files were excluded by the manifest.
To get this to a good state
Nothing is required.
main's boykopovar#21714 set expf's ERANGE in the Math.cpp expf this branch replaces. The branch's msun expf in MathExpf.cpp keeps the console's errno (overflow and the underflows the console reports; guest_math pins those bits), so the Math.cpp definition stays removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged current The one conflict was The port already gives the console's I checked this rather than assume it. Wrapping the port with #21714's rule ( Tested at AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The changed expf implementation and its regression coverage support the stated rounding and exception behavior at 9a339843cfb400226067217d2c7058846705bde0.
What I ran
Inspected the prepared diff and changed source context at the pinned head; no executable checks were run.
Inspected description.md, commits.md, manifest.json, diff.patch, files.json, and the changed-file contents in files/.
Read targeted source ranges with repo_read.py at the pinned head.
The description reports Linux test results from earlier heads; those are author-reported and were not reproduced for this review.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | All seven changed files reviewed; none excluded |
| Tests in this review | not run | No build or test execution |
| Author-reported validation | not run | Reports describe earlier heads |
Negative control
Not run; no tests were executed in this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
MathExpf.cppat the reviewed headGuestExpfEnvironment.cppat the reviewed headMath.cppat the reviewed head
Not verified
No tests were run at this head. Windows, macOS, console behavior, and title-specific behavior were not verified. The Linux, Windows, and differential results in the PR description are author-reported results for earlier revisions.
To get this to a good state
Nothing is required.
ligmaSec
left a comment
There was a problem hiding this comment.
Built the focused checks against the existing Linux runtime. GuestExpfEnvironment and GuestMath passed.
AI-assisted: yes.
What
expfnow preserves the scalar bundled-libc algorithm's results and floating-point side effects across caller rounding modes. It uses the existing msun-derived reduction and polynomial, with the native range branches, evaluation order and fixed binary32 constants._Feraise(8)and returns positive infinity. The explicit underflow branch calls_Feraise(16)before the final multiplication; the general subnormal path leaves errno unchanged.huge + xinexact trigger.1 + (x - ratio)order. Exact hexadecimal float constants avoid runtime double-to-float conversion under directed rounding.MathExpf.cppretains the existing Sun/msun licence and attribution, with source-scoped-frounding-mathand-ffp-contract=off.The
log1pfprerequisite from #10007 and its authored history remain intentionally retained. This updates the existing PR; no duplicate expf implementation PR is created.Tested
Current-head Linux validation (2026-11-27):
f876efc0ef1c529370c6304149e3adb8443e27f4merges mainf73d791b3df4dcaa773297a93f5ae2c062ee95a3and retains main's scalar and fusedlogfpaths alongside this PR's dedicatedMathExpf.cpp. All six targeted Linux x86-64 Release CTests passed with zero skips. Theguest_expf_environmentsuite passed all 1,128 checks, and the dedicated source retained-frounding-math -ffp-contract=off. Exact-head Linux report.Historical CMake maintenance (2026-11-26): head
996aaa42e5f8c7d72bf09031e317b2c9e7228bcfmerges main79e4f35199fa93b44e4689f391f603dec5b702cb. The maintenance commit changes only CMake placement: the expf source/flag blocks avoid the gamma insertion points, andguest_expf_environmentmoves into an independent test fragment with its originalBUILD_TESTINGguard.MathExpf.cppandGuestExpfEnvironment.cppremain byte-identical to public head86fc4fc9c2f0.A fresh Linux x86-64 / GCC 16.2.1 / Release Ninja build of raw libc/kernel and four focused executables passes.
guest_expf_environment,guest_math,guest_math_elementaryandguest_floating_pointpass, 4/4, zero skips. The CTest backtrace confirms registration from the new fragment; Ninja retains-frounding-mathand-ffp-contract=off; actual raw-provider loading and unchanged input hashes are verified. Conventions, debt-fold and whitespace checks pass. Full Git pair merges with #10226 (ca8a86166e6f), #24306 (0fbd95fdc9d6) and #24360 (53137577143a) are clean; the gamma pairs conflicted in CMake before this maintenance. These are merge checks, not new gamma runtime tests.Maintenance patch, build/test helpers, compiler flags, registration/loader receipts, logs and JUnit — anonymous download and all 20 payload hashes verified; SHA-256
8bd6922de236eda39482f5021367095aca6bfebed52f2d09464650455e5c2ce8. This maintenance validation did not rerun the full patched SDK, Windows, original-module differential, console, title/GPU or performance checks. Earlier mathematical validation remains pinned to the revisions below.Earlier refresh: merged upstream
786bc3afa1c874f98ec2990eb58179a99eeb425cas86fc4fc9c2f04da5210c6cf23a69aa2f4eed05ce. The CMake conflict keeps both this PR'sguest_expf_environmentregistration and main'sguest_lgamma_polesregistration, including their separate Windows environment blocks. The productionMathExpf.cpp, golden fixture and debt fragment are byte-identical to the corrected prior head61549d86.At that earlier pin on Linux 7.3.5-arch1-1, the complete patched/raw SDK and relinker build pass. All five focused CPU groups pass:
guest_math,guest_math_exact,guest_dinkumware_internals,guest_floating_point,guest_expf_environment. Source, configuration and submodules were restored. Current-main patch, build provenance, frozen SDK hashes and verbose test logs, SHA-256811511ebd9c391badddb43bf75489f38728e09bbf92f8ebe24bf11134a634ee8; downloaded again and verified all 19 payload hashes plus the manifest. Hosted CI was pending when that refreshed-pin report was written. The Windows owner also reports the earlier public head86fc4fc9c2f0merged onto main87b7ef3891asc553316ef1:guest_expf_environment,guest_lgamma_polesandguest_mathall pass in each of three runs on Windows 11 Enterprise 22621 / WinLibs GCC 15.2 UCRT Release. This is a three-group Windows check, not a claim that the whole Windows suite ran. Owner report.The original differential and trap measurements below remain historical evidence at their named pins.
Arch Linux x86-64, GCC 16.2.1, Release. Main
7fa48cd1c6cda62b4ebe86575085199a33e08c1d; old public #10113ea1052637d616b6ec43ed9fd0ec4ed90f971f2a6; corrected head61549d86c2a61edbd005d9b441748b3d9bd906aa. Comparisons use frozen private merges of the public branches onto that main. The old-PR composition and the corrected head's pre-fix parent have identical source trees.Full SDK
libs, relinker and four existing CPU groups built and passed on main, main plus old #10113, and main plus #21714. The correction also passes the newguest_expf_environmenttest: 1,128 result/flag/errno/control checks, including a pending divide-by-zero flag. All five groups pass. The exact same new executable fails against both main and old #10113 raw test libraries, then passes with the correction; loader paths are verified and loader failures are excluded.Actual patched SDK versus the original converted PPSA21564 libc export (
ab860676108827e0983eefbde3a711b5ce8e20f0b24b492498b6e04cb23c6130): 6,906 inputs × three x87 precisions × four rounding modes × four DAZ/FTZ states × two pending states = 662,976 comparisons per bank. Both function owners are checked by device/inode, reference outcomes are identical across providers, and banks/modules/probe hashes remain unchanged.Caller control differences: zero for every bank. The SDK's
__erroraliases host errno on this Linux machine, so the two logged errno columns are one channel, not independent measurements.A separate Linux child-process comparison enables exception traps in both x87 and SSE: 144 reference/SDK pairs, checking first-trap signal, flags, errno, result and controls. Old #10113 has 96 mismatches; the correction has zero. Original-module dependencies, including
_Feraise, still come from each SDK, so this does not independently establish console/helper conformance.Complete evidence, source patches and reproducers — SHA-256
eb013afbaf76b1a234a17402ee3c0afc5befd14cf1543813613bdcbe88903bf1, 166 payloads; downloaded and every payload verified. Original binaries, original assembly, game assets, SDK binaries and caches are excluded.Conventions pass; the merge-tree check against current main is clean. The official overlap scan and pinned manual comparisons are included. #10226 is the dependent erff/erfcf child; #21714 is a tested alternative, not a dependency; #19434 forwards a separate library surface; #24322 splits source files. The gamma PRs share independent additive CMake registrations. All fifteen fail-closed primary patches match previously reviewed pins, and the two additional shared test hunks concern nextafter/nexttoward and double lgamma only.
These are sampled Linux CPU measurements, not a new exhaustive all-float result. Prior Windows/macOS reports on the old public head remain historical. The separate Windows owner report above covers three focused groups on the refreshed head composed with its named main; it does not reproduce the original-module differential or trap comparisons. No new macOS qualification is available. FMA-contracted title variants can retain different last bits, as documented in debt. No console execution, game unblock, GPU, loading-time or FPS improvement is claimed.
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)Summary by CodeRabbit
expfresults across normal and very small inputs, including overflow, underflow, and subnormal cases.expfbehavior across rounding modes and floating-point exception conditions.log1pfresults for finite inputs within its valid range, while retaining handling for values outside that range.