fix(libc): preserve expf rounding and exception behavior #10113

Open
JJenkx wants to merge 28 commits from upstream-pr/10113 into main
JJenkx commented 2026-10-23 09:57:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-23T09:57:14Z.


What

expf now 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.

  • Overflow calls _Feraise(8) and returns positive infinity. The explicit underflow branch calls _Feraise(16) before the final multiplication; the general subnormal path leaves errno unchanged.
  • The native argument-1 literal returns without adding inexact. Small arguments retain the huge + x inexact trigger.
  • Arithmetic follows the native 1 + (x - ratio) order. Exact hexadecimal float constants avoid runtime double-to-float conversion under directed rounding.
  • MathExpf.cpp retains the existing Sun/msun licence and attribution, with source-scoped -frounding-math and -ffp-contract=off.

The log1pf prerequisite 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): f876efc0ef1c529370c6304149e3adb8443e27f4 merges main f73d791b3df4dcaa773297a93f5ae2c062ee95a3 and retains main's scalar and fused logf paths alongside this PR's dedicated MathExpf.cpp. All six targeted Linux x86-64 Release CTests passed with zero skips. The guest_expf_environment suite 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 996aaa42e5f8c7d72bf09031e317b2c9e7228bcf merges main 79e4f35199fa93b44e4689f391f603dec5b702cb. The maintenance commit changes only CMake placement: the expf source/flag blocks avoid the gamma insertion points, and guest_expf_environment moves into an independent test fragment with its original BUILD_TESTING guard. MathExpf.cpp and GuestExpfEnvironment.cpp remain byte-identical to public head 86fc4fc9c2f0.

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_elementary and guest_floating_point pass, 4/4, zero skips. The CTest backtrace confirms registration from the new fragment; Ninja retains -frounding-math and -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 786bc3afa1c874f98ec2990eb58179a99eeb425c as 86fc4fc9c2f04da5210c6cf23a69aa2f4eed05ce. The CMake conflict keeps both this PR's guest_expf_environment registration and main's guest_lgamma_poles registration, including their separate Windows environment blocks. The production MathExpf.cpp, golden fixture and debt fragment are byte-identical to the corrected prior head 61549d86.

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-256 811511ebd9c391badddb43bf75489f38728e09bbf92f8ebe24bf11134a634ee8; 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 head 86fc4fc9c2f0 merged onto main 87b7ef3891 as c553316ef1: guest_expf_environment, guest_lgamma_poles and guest_math all 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 #10113 ea1052637d616b6ec43ed9fd0ec4ed90f971f2a6; corrected head 61549d86c2a61edbd005d9b441748b3d9bd906aa. 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 new guest_expf_environment test: 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.

Provider Result differences Raw exception-flag differences Errno differences
Main 121,704 924 3,840
Main + old #10113 83,364 2,124 0
Main + #21714 121,704 12,912 15,576
Corrected #10113 0 0 0

Caller control differences: zero for every bank. The SDK's __error aliases 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

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10007
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Bug Fixes
    • Improved expf results across normal and very small inputs, including overflow, underflow, and subnormal cases.
    • Improved expf behavior across rounding modes and floating-point exception conditions.
    • Improved log1pf results for finite inputs within its valid range, while retaining handling for values outside that range.
  • Documentation
    • Added notes on updated math behavior and reported comparison results, including coverage and areas that have not yet been verified.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4981012789 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-23T09:57:14Z. --- ### What `expf` now 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. - Overflow calls `_Feraise(8)` and returns positive infinity. The explicit underflow branch calls `_Feraise(16)` before the final multiplication; the general subnormal path leaves errno unchanged. - The native argument-1 literal returns without adding inexact. Small arguments retain the `huge + x` inexact trigger. - Arithmetic follows the native `1 + (x - ratio)` order. Exact hexadecimal float constants avoid runtime double-to-float conversion under directed rounding. - `MathExpf.cpp` retains the existing Sun/msun licence and attribution, with source-scoped `-frounding-math` and `-ffp-contract=off`. The `log1pf` prerequisite from #10007 and its authored history remain intentionally retained. This updates the existing PR; no duplicate expf implementation PR is created. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> **Current-head Linux validation (2026-11-27):** `f876efc0ef1c529370c6304149e3adb8443e27f4` merges main `f73d791b3df4dcaa773297a93f5ae2c062ee95a3` and retains main's scalar and fused `logf` paths alongside this PR's dedicated `MathExpf.cpp`. All six targeted Linux x86-64 Release CTests passed with zero skips. The `guest_expf_environment` suite passed all 1,128 checks, and the dedicated source retained `-frounding-math -ffp-contract=off`. [Exact-head Linux report](https://github.com/boykopovar/AnyPS5/pull/10113#issuecomment-7216222896). **Historical CMake maintenance (2026-11-26):** head `996aaa42e5f8c7d72bf09031e317b2c9e7228bcf` merges main `79e4f35199fa93b44e4689f391f603dec5b702cb`. The maintenance commit changes only CMake placement: the expf source/flag blocks avoid the gamma insertion points, and `guest_expf_environment` moves into an independent test fragment with its original `BUILD_TESTING` guard. `MathExpf.cpp` and `GuestExpfEnvironment.cpp` remain byte-identical to public head `86fc4fc9c2f0`. 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_elementary` and `guest_floating_point` pass, **4/4, zero skips**. The CTest backtrace confirms registration from the new fragment; Ninja retains `-frounding-math` and `-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](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261122/pr10113-cmake-996aaa-linux-20261126.tar.gz) — 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 `786bc3afa1c874f98ec2990eb58179a99eeb425c` as `86fc4fc9c2f04da5210c6cf23a69aa2f4eed05ce`. The CMake conflict keeps both this PR's `guest_expf_environment` registration and main's `guest_lgamma_poles` registration, including their separate Windows environment blocks. The production `MathExpf.cpp`, golden fixture and debt fragment are byte-identical to the corrected prior head `61549d86`. 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](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr10113-86fc4fc9-linux-refresh-20261121.tar.gz), SHA-256 `811511ebd9c391badddb43bf75489f38728e09bbf92f8ebe24bf11134a634ee8`; 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 head `86fc4fc9c2f0` merged onto main `87b7ef3891` as `c553316ef1`: `guest_expf_environment`, `guest_lgamma_poles` and `guest_math` all 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](https://github.com/boykopovar/AnyPS5/pull/10226#issuecomment-7073417112). 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 #10113 `ea1052637d616b6ec43ed9fd0ec4ed90f971f2a6`; corrected head `61549d86c2a61edbd005d9b441748b3d9bd906aa`. 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 new `guest_expf_environment` test: **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. | Provider | Result differences | Raw exception-flag differences | Errno differences | |---|---:|---:|---:| | Main | 121,704 | 924 | 3,840 | | Main + old #10113 | 83,364 | 2,124 | 0 | | Main + #21714 | 121,704 | 12,912 | 15,576 | | Corrected #10113 | **0** | **0** | **0** | Caller control differences: zero for every bank. The SDK's `__error` aliases 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](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/expf-fenv-61549d86-linux-20261120.tar.gz) — 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 <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10007 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved `expf` results across normal and very small inputs, including overflow, underflow, and subnormal cases. * Improved `expf` behavior across rounding modes and floating-point exception conditions. * Improved `log1pf` results for finite inputs within its valid range, while retaining handling for values outside that range. * **Documentation** * Added notes on updated math behavior and reported comparison results, including coverage and areas that have not yet been verified. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MarcZX10 commented 2026-10-23 10:20:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:20:52Z.

Review: CHANGES_REQUESTED


I reviewed exact head 1977b6b65df827e4d963ae7964dd59676c120f9a. 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5626927277 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5626927277). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T10:20:52Z. **Review:** CHANGES_REQUESTED --- I reviewed exact head 1977b6b65df827e4d963ae7964dd59676c120f9a. 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.
MarcZX10 commented 2026-10-23 10:37:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:37:29Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5627087127 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5627087127). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T10:37:29Z. **Review:** CHANGES_REQUESTED --- 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.
MarcZX10 commented 2026-10-31 22:49:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T22:49:15Z.

Review: APPROVED


Reviewed — looks good

The corrected FreeBSD msun implementation, resolved dependency stack, and exact-head qualification evidence address the earlier blockers; I found no remaining blocking defect.

What I ran

Reviewed head e46591956d0814430a5217575d4569d086c78279 against current main 7a5d9bf02af636382aec927593b1a5867899ed0f; the merge preview completed cleanly (tree 9d6e0f49ea728695ba28ac92c9fb9e34e6fa56e6). Environment: Debian Linux 6.1, Python 3.11.2, GCC 12.2.0. No local build or runtime test was run.

git diff --check 7a5d9bf02af636382aec927593b1a5867899ed0f...e46591956d0814430a5217575d4569d086c78279
python3 tools/check_conventions.py --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head e46591956d0814430a5217575d4569d086c78279 --title "fix(libc): compute expf with FreeBSD msun's algorithm, as titles' libc.prx does" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-10113-e46591956d08/pr-body.md
python3 tools/pr_abi_audit.py --repo . --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head e46591956d0814430a5217575d4569d086c78279
git merge-tree --write-tree 7a5d9bf02af636382aec927593b1a5867899ed0f e46591956d0814430a5217575d4569d086c78279
git grep -n 'GuestMath.cpp\|guest_math' e46591956d0814430a5217575d4569d086c78279 -- '**CMakeLists.txt' '*.cmake'

Results

Check Result
Patch whitespace Passed; git diff --check returned exit 0 with no output.
Repository conventions and PR template Passed.
ABI audit Passed; declarations and definitions are present with no audit findings. This lexical audit does not establish binary ABI or runtime correctness.
Test registration The heuristic flagged a possible missing registration, but direct CMake inspection found GuestMath.cpp registered as guest_math in core/libs/prx/libc/CMakeLists.txt. The heuristic warning is not a defect.
Current-main merge preview Passed; clean merge-tree result.
Exact-head Linux tests Author-reported guest_math, guest_math_exact, and guest_dinkumware_internals each passed three runs, plus public_headers; not run locally.
Hosted CI Windows passed. Linux product job was skipped. Both macOS write-watch jobs failed; their check annotations expose only exit code 1.
Raw local check output
All conventions checks passed.
ABI audit: passed
9d6e0f49ea728695ba28ac92c9fb9e34e6fa56e6

CMake registration output:

e46591956d0814430a5217575d4569d086c78279:core/libs/prx/libc/CMakeLists.txt:496:    add_test_executable(guest_math_tests ${LIBS_INCLUDE_DIR}/tests/GuestMath.cpp)
e46591956d0814430a5217575d4569d086c78279:core/libs/prx/libc/CMakeLists.txt:500:    add_test(NAME guest_math COMMAND guest_math_tests)
PR precheck limitation

The no-build precheck could not complete its ABI and test-quality stages inside its isolated PR snapshot because its helper scripts are not part of that snapshot. I ran the ABI helper separately against the exact base and head and manually resolved the test-registration warning above.

/usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-10113/head-e46591956d08-b244cbbd/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-10113/head-e46591956d08-b244cbbd/tools/pr_test_quality.py': [Errno 2] No such file or directory

Findings

Blocking

None.

Non-blocking

The macOS write-watch failures remain visible in hosted CI. The repository tracks duplicate macOS write-watch test registration in #13220; the available check annotations do not establish the failure cause for this run, and this PR changes no write-watch or CMake files.

Sources

  • The algorithm comparison target is FreeBSD e_expf.c at commit 8c639945a44588f6cfdddfb057bb5aad88735da0.
  • The exact-head Linux qualification and source-preservation report is author-provided in the PR discussion; I did not independently rerun its build or tests.
  • The exhaustive all-float comparison against FreeBSD msun is reviewer-reported in the PR discussion; I did not independently reproduce it.

Not verified

I did not build or run CTest locally, run Windows/macOS/Linux binaries myself, validate on a PS5 console, or reproduce the exhaustive comparison. The hosted Linux product job was skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5725326213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5725326213). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T22:49:15Z. **Review:** APPROVED --- # Reviewed — looks good The corrected FreeBSD msun implementation, resolved dependency stack, and exact-head qualification evidence address the earlier blockers; I found no remaining blocking defect. ## What I ran Reviewed head `e46591956d0814430a5217575d4569d086c78279` against current `main` `7a5d9bf02af636382aec927593b1a5867899ed0f`; the merge preview completed cleanly (tree `9d6e0f49ea728695ba28ac92c9fb9e34e6fa56e6`). Environment: Debian Linux 6.1, Python 3.11.2, GCC 12.2.0. No local build or runtime test was run. ```sh git diff --check 7a5d9bf02af636382aec927593b1a5867899ed0f...e46591956d0814430a5217575d4569d086c78279 python3 tools/check_conventions.py --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head e46591956d0814430a5217575d4569d086c78279 --title "fix(libc): compute expf with FreeBSD msun's algorithm, as titles' libc.prx does" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-10113-e46591956d08/pr-body.md python3 tools/pr_abi_audit.py --repo . --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head e46591956d0814430a5217575d4569d086c78279 git merge-tree --write-tree 7a5d9bf02af636382aec927593b1a5867899ed0f e46591956d0814430a5217575d4569d086c78279 git grep -n 'GuestMath.cpp\|guest_math' e46591956d0814430a5217575d4569d086c78279 -- '**CMakeLists.txt' '*.cmake' ``` ## Results | Check | Result | |---|---| | Patch whitespace | Passed; `git diff --check` returned exit 0 with no output. | | Repository conventions and PR template | Passed. | | ABI audit | Passed; declarations and definitions are present with no audit findings. This lexical audit does not establish binary ABI or runtime correctness. | | Test registration | The heuristic flagged a possible missing registration, but direct CMake inspection found `GuestMath.cpp` registered as `guest_math` in `core/libs/prx/libc/CMakeLists.txt`. The heuristic warning is not a defect. | | Current-main merge preview | Passed; clean merge-tree result. | | Exact-head Linux tests | Author-reported `guest_math`, `guest_math_exact`, and `guest_dinkumware_internals` each passed three runs, plus `public_headers`; not run locally. | | Hosted CI | Windows passed. Linux product job was skipped. Both macOS `write-watch` jobs failed; their check annotations expose only exit code 1. | <details><summary>Raw local check output</summary> ```text All conventions checks passed. ABI audit: passed 9d6e0f49ea728695ba28ac92c9fb9e34e6fa56e6 ``` CMake registration output: ```text e46591956d0814430a5217575d4569d086c78279:core/libs/prx/libc/CMakeLists.txt:496: add_test_executable(guest_math_tests ${LIBS_INCLUDE_DIR}/tests/GuestMath.cpp) e46591956d0814430a5217575d4569d086c78279:core/libs/prx/libc/CMakeLists.txt:500: add_test(NAME guest_math COMMAND guest_math_tests) ``` </details> <details><summary>PR precheck limitation</summary> The no-build precheck could not complete its ABI and test-quality stages inside its isolated PR snapshot because its helper scripts are not part of that snapshot. I ran the ABI helper separately against the exact base and head and manually resolved the test-registration warning above. ```text /usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-10113/head-e46591956d08-b244cbbd/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-10113/head-e46591956d08-b244cbbd/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Findings ### Blocking None. ### Non-blocking The macOS write-watch failures remain visible in hosted CI. The repository tracks duplicate macOS write-watch test registration in [#13220](https://github.com/boykopovar/AnyPS5/issues/13220); the available check annotations do not establish the failure cause for this run, and this PR changes no write-watch or CMake files. ## Sources - The algorithm comparison target is FreeBSD `e_expf.c` at commit [`8c639945a44588f6cfdddfb057bb5aad88735da0`](https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/lib/msun/src/e_expf.c). - The exact-head Linux qualification and source-preservation report is author-provided in [the PR discussion](https://github.com/boykopovar/AnyPS5/pull/10113#issuecomment-6522557063); I did not independently rerun its build or tests. - The exhaustive all-float comparison against FreeBSD msun is reviewer-reported in [the PR discussion](https://github.com/boykopovar/AnyPS5/pull/10113#issuecomment-6549954251); I did not independently reproduce it. ## Not verified I did not build or run CTest locally, run Windows/macOS/Linux binaries myself, validate on a PS5 console, or reproduce the exhaustive comparison. The hosted Linux product job was skipped.
MarcZX10 commented 2026-11-14 09:06:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T09:06:23Z.

Review: COMMENTED


Reviewed — comments

The reviewed math implementation and focused regression changes show no concrete defect, but I did not run the reported checks or read every line of each changed file, so approval is not justified.

What I ran

No commands were run. The pinned head is b29bd75e61ae0b190b4ed8105e6f90f3a94423c1; no merged preview was checked. I read the prepared description, commit list, manifest, diff, and targeted changed-file ranges through repo_read.py.

Results

Check Result Note
Targeted code review passed Math paths and test call sites inspected
Reported checks not run Linux results are author-reported
Full-file review not run Only relevant ranges were read

Findings

Blocking

None identified in the inspected ranges.

Non-blocking

None.

Sources

The reviewed diff is pinned to b29bd75e61ae0b190b4ed8105e6f90f3a94423c1. Changed lines inspected include core/libs/prx/libc/src/Math.cpp:1799 and :3880, core/libs/tests/GuestMath.cpp:3005 and :3760, and docs/dev/debt/libc.md:256 and :379.

Not verified

I did not run builds or tests, verify the author's attached evidence, inspect every line of the changed files, or qualify Windows, macOS, console, title, GPU, or floating-point exception behavior. The description reports Linux checks and identifies a shared public_headers failure on this head and pinned main. I read targeted ranges in all three changed files; the prepared diff and manifest were read. No changed files were excluded from the bundle.

To get this to a good state

Nothing is required. Optional: complete a full-file review and rerun the required checks on this exact head before seeking approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5903339812 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5903339812). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T09:06:23Z. **Review:** COMMENTED --- # Reviewed — comments The reviewed math implementation and focused regression changes show no concrete defect, but I did not run the reported checks or read every line of each changed file, so approval is not justified. ## What I ran No commands were run. The pinned head is `b29bd75e61ae0b190b4ed8105e6f90f3a94423c1`; no merged preview was checked. I read the prepared description, commit list, manifest, diff, and targeted changed-file ranges through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Targeted code review | passed | Math paths and test call sites inspected | | Reported checks | not run | Linux results are author-reported | | Full-file review | not run | Only relevant ranges were read | ## Findings ### Blocking None identified in the inspected ranges. ### Non-blocking None. ## Sources The reviewed diff is pinned to `b29bd75e61ae0b190b4ed8105e6f90f3a94423c1`. Changed lines inspected include `core/libs/prx/libc/src/Math.cpp:1799` and `:3880`, `core/libs/tests/GuestMath.cpp:3005` and `:3760`, and `docs/dev/debt/libc.md:256` and `:379`. ## Not verified I did not run builds or tests, verify the author's attached evidence, inspect every line of the changed files, or qualify Windows, macOS, console, title, GPU, or floating-point exception behavior. The description reports Linux checks and identifies a shared `public_headers` failure on this head and pinned main. I read targeted ranges in all three changed files; the prepared diff and manifest were read. No changed files were excluded from the bundle. ## To get this to a good state Nothing is required. Optional: complete a full-file review and rerun the required checks on this exact head before seeking approval.
kurexw commented 2026-11-17 04:45:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-17T04:45:49Z.

Review: COMMENTED


Tested on an Apple M4 (macOS 27.2, Apple clang 21.0.0, x86-64 build under Rosetta).

GitHub marks this PR as conflicting, but it merged cleanly onto main at a72186d3cf plus #22056 and #22074 (two build fixes that main needs on macOS), so I tested it there. Each binary was run 3 times.

guest_math_exact guest_math
base fails at GuestMathExact.cpp:687 (expf(89.0f): errno == ERANGE) fails at GuestMath.cpp:4971 (unrelated, see #22081)
base + this PR passes 3/3 same failure, now at line 5058 because of the added tests
base + this PR + #22081 passes 3/3 passes 3/3, including the expf cases this PR adds

On macOS, the msun algorithm sets ERANGE itself instead of relying on the host libm, which never sets errno.

Overlap: the newer #21714 fixes the same guest_math_exact failure here by setting errno around std::exp.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5933024194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5933024194). Originally posted by [kurexw](https://github.com/kurexw) on 2026-11-17T04:45:49Z. **Review:** COMMENTED --- Tested on an Apple M4 (macOS 27.2, Apple clang 21.0.0, x86-64 build under Rosetta). GitHub marks this PR as conflicting, but it merged cleanly onto `main` at a72186d3cf plus #22056 and #22074 (two build fixes that `main` needs on macOS), so I tested it there. Each binary was run 3 times. | | `guest_math_exact` | `guest_math` | |---|---|---| | base | fails at `GuestMathExact.cpp:687` (`expf(89.0f)`: `errno == ERANGE`) | fails at `GuestMath.cpp:4971` (unrelated, see #22081) | | base + this PR | passes 3/3 | same failure, now at line 5058 because of the added tests | | base + this PR + #22081 | passes 3/3 | passes 3/3, including the `expf` cases this PR adds | On macOS, the msun algorithm sets ERANGE itself instead of relying on the host libm, which never sets `errno`. Overlap: the newer #21714 fixes the same `guest_math_exact` failure here by setting `errno` around `std::exp`.
MarcZX10 commented 2026-11-17 20:52:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T20:52:22Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional. The change ports expf and log1pf to FreeBSD msun's algorithms, and I found no defect in the code I read.

Head reviewed: ea1052637d616b6ec43ed9fd0ec4ed90f971f2a6 (base main).

What I ran

  • Read the changed hunks in diff.patch and the matching head code via repo_read.py (includes and errno setup in core/libs/prx/libc/src/Math.cpp).
  • No builds and no tests were run in this review.

Results

Check Result Note
Code read against msun structure passed Manual read only
Build and guest math tests not run Author-reported only
Repository conventions (comments) passed Only licence notices added

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libc/src/Math.cpp:17: the added Sun copyright block repeats the one that already follows it. Keeping one copy with both attributions would be tidier. Optional.

Sources

  • The msun references are cited in the debt fragment docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md. I did not check the linked FreeBSD permalinks.

Not verified

  • Bit-exact equivalence with msun and with the titles' libc.prx (the 2^32-argument claims in the PR description and the debt fragment). These rest on the author's runs and on the external archive, which I did not open.
  • The #10007 prerequisite for the log1pf changes: I did not confirm its merge state.
  • Full file text of the three reviewed files: only their changed hunks were read, through diff.patch.

To get this to a good state

Nothing is required. Optionally, merge the two copyright blocks in core/libs/prx/libc/src/Math.cpp.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5946424328 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-5946424328). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T20:52:22Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. The change ports `expf` and `log1pf` to FreeBSD msun's algorithms, and I found no defect in the code I read. **Head reviewed:** `ea1052637d616b6ec43ed9fd0ec4ed90f971f2a6` (base `main`). ## What I ran - Read the changed hunks in `diff.patch` and the matching head code via `repo_read.py` (includes and `errno` setup in `core/libs/prx/libc/src/Math.cpp`). - No builds and no tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Code read against msun structure | passed | Manual read only | | Build and guest math tests | not run | Author-reported only | | Repository conventions (comments) | passed | Only licence notices added | ## Findings **Blocking** None. **Non-blocking** - `core/libs/prx/libc/src/Math.cpp:17`: the added Sun copyright block repeats the one that already follows it. Keeping one copy with both attributions would be tidier. Optional. ## Sources - The msun references are cited in the debt fragment `docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md`. I did not check the linked FreeBSD permalinks. ## Not verified - Bit-exact equivalence with msun and with the titles' `libc.prx` (the 2^32-argument claims in the PR description and the debt fragment). These rest on the author's runs and on the external archive, which I did not open. - The `#10007` prerequisite for the `log1pf` changes: I did not confirm its merge state. - Full file text of the three reviewed files: only their changed hunks were read, through `diff.patch`. ## To get this to a good state Nothing is required. Optionally, merge the two copyright blocks in `core/libs/prx/libc/src/Math.cpp`.
MarcZX10 commented 2026-11-21 00:20:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T00:20:26Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the author’s Linux evidence reports that the corrected implementation passed the stated CPU comparisons and builds.

What I ran

Reviewed head 61549d86c2a61edbd005d9b441748b3d9bd906aa. I read the prepared description, commits, diff and manifest, then inspected all six changed files at the pinned head using repo_read.py. No build or tests were run in this review.

Results

Check Result Note
Change and call sites passed Reviewed all changed files
Build and tests not run Results in description are author-reported
Console and Windows not run Not claimed for this correction

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the reported Linux builds, fixture comparisons, negative controls, or console/Windows checks. The reported results and external evidence archive were not independently verified. The changed files read were core/libs/prx/libc/CMakeLists.txt, core/libs/prx/libc/src/Math.cpp, core/libs/prx/libc/src/MathExpf.cpp, core/libs/tests/GuestExpfEnvironment.cpp, core/libs/tests/GuestMath.cpp, and docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md; all six files marked reviewed in the manifest were read. files.json was not available through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6001182694 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6001182694). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T00:20:26Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the author’s Linux evidence reports that the corrected implementation passed the stated CPU comparisons and builds. ## What I ran Reviewed head `61549d86c2a61edbd005d9b441748b3d9bd906aa`. I read the prepared description, commits, diff and manifest, then inspected all six changed files at the pinned head using `repo_read.py`. No build or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Change and call sites | passed | Reviewed all changed files | | Build and tests | not run | Results in description are author-reported | | Console and Windows | not run | Not claimed for this correction | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run the reported Linux builds, fixture comparisons, negative controls, or console/Windows checks. The reported results and external evidence archive were not independently verified. The changed files read were `core/libs/prx/libc/CMakeLists.txt`, `core/libs/prx/libc/src/Math.cpp`, `core/libs/prx/libc/src/MathExpf.cpp`, `core/libs/tests/GuestExpfEnvironment.cpp`, `core/libs/tests/GuestMath.cpp`, and `docs/dev/debt/changes/refresh-expf-log1pf-msun-20261117.md`; all six files marked `reviewed` in the manifest were read. `files.json` was not available through the reader. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-22 07:30:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T07:30:35Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011055552 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6011055552). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T07:30:35Z. **Review:** APPROVED --- # 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.
MarcZX10 commented 2026-11-26 12:23:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T12:23:57Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6074068009 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6074068009). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-26T12:23:57Z. **Review:** APPROVED --- # 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.
MarcZX10 commented 2026-11-27 11:34:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T11:34:34Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6087513355 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6087513355). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-27T11:34:34Z. **Review:** COMMENTED --- # 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.
MarcZX10 commented 2026-11-29 22:08:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T22:08:42Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6105057732 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6105057732). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-29T22:08:42Z. **Review:** APPROVED --- # 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.
MarcZX10 commented 2026-11-30 22:31:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T22:31:15Z.

Review: APPROVED


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

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6121758957 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6121758957). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-30T22:31:15Z. **Review:** APPROVED --- # 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. ```text 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.cpp` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/9a339843cfb400226067217d2c7058846705bde0/core/libs/prx/libc/src/MathExpf.cpp) - [`GuestExpfEnvironment.cpp` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/9a339843cfb400226067217d2c7058846705bde0/core/libs/tests/GuestExpfEnvironment.cpp) - [`Math.cpp` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/9a339843cfb400226067217d2c7058846705bde0/core/libs/prx/libc/src/Math.cpp) ## 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 commented 2026-12-03 13:25:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:25:08Z.

Review: COMMENTED


Built the focused checks against the existing Linux runtime. GuestExpfEnvironment and GuestMath passed.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170653473 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10113#pullrequestreview-6170653473). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T13:25:08Z. **Review:** COMMENTED --- Built the focused checks against the existing Linux runtime. `GuestExpfEnvironment` and `GuestMath` passed. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/10113:upstream-pr/10113'
git switch 'upstream-pr/10113'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/10113'
git switch 'upstream-pr/10113'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/10113'
git switch 'upstream-pr/10113'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/10113'
git switch 'main'
git merge --squash 'upstream-pr/10113'
git switch 'main'
git merge --ff-only 'upstream-pr/10113'
git switch 'main'
git merge 'upstream-pr/10113'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10113
No description provided.