fix(libc): preserve log1p reduction rounding #10546

Merged
JJenkx merged 12 commits from upstream-pr/10546 into main 2026-11-11 22:06:41 +00:00
JJenkx commented 2026-10-24 09:20:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-24T09:20:53Z.


What

Stacked follow-up to #10314. For log1p(0x3fefffffffffffff) with upward rounding, the port returns 0x3fe62e42fefa39ef; two supplied titles’ bundled libraries return 0x3fe62e42fefa39f0.

Form the positive-exponent range-reduction correction as 1 + (x - u) instead of 1 - (u - x). The mathematical value agrees, but rounding the inner subtraction in the opposite direction changes the correction. This is one generic expression change, with a 48-call regression covering four rounding modes, four DAZ/FTZ combinations and three sticky-flag seeds; no input-specific production branch.

Only the reduction association and its regression are new relative to refreshed parent 185098a39d9179907e11d15fa9a58b27e6aac306. This branch retains #10314’s implementation and history; #10314 has since merged into main. #10512 independently fixes the parent’s pole/domain exception behavior and is not included or required here. Both follow-ups should be retained when integrating the parent. #10315 also contains the same parent for its separate atanh work; it does not supply this correction. Shared GuestMath/debt insertion overlaps with other math topics require preserving their cases after whichever lands first. No unrelated topic is a dependency.

Tested

Current-main integration — 2026-11-09 UTC. Head 6b7c1426b7f594503e1979e667b8b2c52ecb338a preserves public head e870883c659f5874cdd0eb824ee4ed196f4f7306 and integrates pinned main 7259cce11195f360698772da8c0b3af756bf7c8f. Conflict resolution retains both the topic and main's newer source/test/debt changes; maintainer commits and attribution remain intact.

Linux x86-64, GCC 16.2.1, Ninja Release: actual libc/libkernel and focused fixture owners rebuilt. 12/12 CPU executions pass, zero skips (4 groups × three repetitions): guest_math, guest_math_elementary, guest_math_exact, guest_dinkumware_internals. public_headers, conventions and whitespace checks pass. The matching plain-main control passed 102 selected CPU executions and its header audit. CPU fixtures execute unpatched production libraries; this is not a full SDK or patched-title runtime qualification.

No new Windows/macOS, console, GPU, title or performance result is claimed. Source checks preserve the existing production topic; historical reports below retain their original pins.

Build/test logs, exact heads, source/ancestry checks and provider pins, SHA-256 52727be6594b9c15bf9a5535fef374b985e9526aabe5f3ef5cf5857dfeeb1a0d. The public archive and all 178 manifest files were download/hash verified.

Latest integration (2026-11-05): head c1decc6bdbe50fe4cf461252e953e9313ec8405e, tested on main 1859e6af1cad6e19e0c79530bca8f4d6c1d43a82. This supersedes the integration pins in earlier reports below. Main now includes the atanh port #10315; its new regressions and the hypot regressions are retained alongside this PR's cases.

Fresh Linux Release qualification: the actual libc CMake owner plus guest_math, guest_math_exact and guest_dinkumware_internals, each repeated three times on main and this head, all pass with zero skips. The frozen branch math fixture fails with the baseline library and passes again with its own restored library. Conventions and whitespace pass; final merge preview against main 6a337633c649805fb469960e53d43ec612e6e6d3 is clean. Fresh validation is CPU-only; earlier Windows/module reports remain at their recorded pins.

Source diffs, exact pins, actual-owner recipe, build/test/JUnit/control logs and binary/provider hashes, SHA-256 ad099369f7cae288f5353e8aeb196df80367b61ddc8454cf939a5dc522dbba1b (download verified). No new SDK-module sampling, whole-project, Windows or title-performance result is claimed.

Current integration — 2026-11-05. Head c2b06b93aa8e7afd0ba18d3e6efe28eabdf3c404 includes pinned main 6d173c1a19788ff69d43b3d0ca62833e312ef939 and retains the previous public history, notices, main math implementations and actual prerequisites.

Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; guest_math, guest_math_exact and guest_dinkumware_internals each pass 3/3 (9 passes, zero skips). The same groups pass 3/3 on pinned main. Source/parent/macro/notice checks and conventions pass. All 34 recursive provider trees / 31,551 tracked blobs verify before and after the gate; QuickJS test262 is excluded as declared update=none test data.

Shared main blocker: public_headers fails on this head and pinned main for the same five missing WKSecurityOrigin declarations. PR #16010 restores them separately; a maintainer needs to merge that fix and rerun required checks. This math branch does not contain the unrelated WebKit patch. Header audits and all required CI are not claimed green.

The older Windows compile failure in DepthSurface.cpp was a shared main API mismatch, fixed upstream by merged PR #15855, already included in this head. Its own hosted Windows compile job passed; this is not a fresh Windows qualification of this math head.

Immutable source/audit/log/JUnit/hash and exact-lease push evidence, SHA-256 ef9e085442553c0fce1a4a6ce15781e4e890dc001a3424e1ef972f9b769f3065 (download and member hashes verified). Earlier dated platform/negative/reference reports retain their original source pins. No new Windows, console/SDK-module, GPU/title, exhaustive or performance result. AI-assisted: yes, Codex Sol6.1 medium.

All earlier qualification text below is historical and retains its recorded source/platform pins, including earlier linear/no-merge descriptions.

Current-main refresh — 2026-11-04. Head c339b78f59c59dec8588f51ed8f66b633b6230c7 merges main 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c while retaining the prior public head as an ancestor. Main’s newer code, regression fixtures and debt entries are preserved alongside this topic.

Linux x86-64, GCC16.2.1, Ninja Release: actual libc, libkernel and libSceAmpr CMake owners rebuilt coherently. guest_math, guest_math_exact, guest_dinkumware_internals each pass three consecutive runs (9 passes, zero skips). The same groups pass three times on pinned main. Public-header audit and conventions pass. Original licence-notice trailing whitespace is retained where present. The scoped recipe reuses frozen ZArchive/zstd providers; this is not a whole-project build. No new Windows, bundled-SDK, physical-console, title/GPU or FPS measurement is claimed; earlier reports retain their original pins.

Exact source/parent proofs, per-branch patches/input manifests, build and CTest logs/JUnit, library/executable hashes and scoped CMake recipe, SHA-256 97a2377bc996be1690e8853e1ea090a98b5ed808bcc37a15a5cdada5c2e00845 (download verified). AI-assisted: yes (Codex).

Current-main integration — 2026-11-03. Head 8ea47fedc8a0fb252480bf9c7af76d5265684d9a includes main 4f41f4c375f5abb487dbd184fbc150f31994d762 and retains the prior public history and attribution/licence notices. Main’s newer math implementations and fixtures remain alongside this topic.

Linux x86-64 Release, GCC 16.2.1, Ninja, BUILD_TESTING=ON: rebuilt actual libc and math executables. guest_math, guest_math_exact, and guest_dinkumware_internals each pass 3/3 (9 passes, zero skips); public_headers and conventions pass. The same three groups pass 3/3 plus headers on pinned main. All 34 recursive dependency trees and 31,551 tracked blobs verify with zero errors; the update=none QuickJS test262 corpus is excluded from these library inputs. Whitespace check passes.

Source/parent/gitlink proofs, exact library/test hashes, raw logs/JUnit, and head-leased push receipts: qualification archive, SHA-256 e6a50522bc28e30871fdc2c12a88d2537515914239e8166f6237f48895126a06 (download verified). Older platform/reference reports retain their original pins; no new Windows/macOS, SDK-module, console, title/GPU or performance claim. AI-assisted: yes (Codex).

Earlier dated qualifications below retain their recorded source/platform pins.

Current-main integration (2026-11-02): 59a2d4e415ec29bc4f37af9e2ed83a46b623c96f includes main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 and retains the existing public commits. Conflicts preserve main’s math implementations, regression checks and debt entries alongside this topic. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; guest_math, guest_math_exact and guest_dinkumware_internals each pass three times (9 passes, zero skips), and public_headers passes. The same baseline groups pass on main; conventions and whitespace pass. Source and dependency blobs, executable/library hashes, raw logs and JUnit are retained. This refresh adds no new console, Windows, title, GPU or numerical-reference measurement. Qualification evidence, SHA-256 22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52 (download verified).

Current-main conflict refresh, 2026-10-27 UTC: exact head ffec55dd7c891fe641fd86ee16da69e398763ac4 on tested main 74acfad65b3f0fd4eab653f3a3989d298fba1157. Resolved overlapping test/debt context while preserving this branch's authored production/test edits and main's nextafter environment implementation and coverage. Existing prerequisite commits remain in their original series order.

Linux focused rebuild of libc and selected test executables passes guest_math and guest_math_exact, each three times: 6 passes, zero skips. Conventions and whitespace checks pass. Final fetched main cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f merges cleanly; its later change is an unrelated Windows crash-test pattern, and the executed qualification remains pinned to the stated base. No new Windows, console, GPU, title, full-suite or negative-control run is claimed. Earlier reference/Windows evidence keeps its original pins.

Exact pins, branch patches, preservation proofs, build/test logs, JUnit and lease-push receipts for this refresh batch. SHA-256: e33f98cc467f038af662cc5fa491c3acc1806bb47171cf77b748f0d4d052c1f2; downloaded copy verified.

Refreshed head 3e3758ce7a29959120b8915157137fdf63ce7e7c: two topic commits directly on current #10314 185098a39d9179907e11d15fa9a58b27e6aac306, based on main 6c7a3256f25d2ea56702d06a2283ecc27ff133b3. A local merge-tree check with main 8b426927d7d91c137e6f4704acc860f060a2798a is clean. The original log1p implementation and regression function are preserved, with main’s public libc declarations retained. The entire production file differs from the immediate parent by the single original correction expression.

Fresh Linux x86-64 Release: libc and all three math targets rebuilt; guest_math, guest_math_exact, guest_dinkumware_internals and public_headers each pass three repeats. Same final tests with the immediate parent’s Math.cpp fail at log1p reduction: input=3fefffffffffffff mode=2; exact-math and Dinkumware controls pass. Restored candidate passes all four groups three times and restores a byte-identical libc. Conventions/whitespace pass. No original-library matrix, Windows, whole-title or performance comparison was repeated.

Fresh exact-head logs, negative/restoration checks, source proof and patch, SHA-256 99bb969b2e692880d5e3356e3bfdb8b8b42da580184ce215314bc265756d256b.

Earlier qualification (historical source pins)

Arch Linux 7.2.9, GCC 16.2.1, Ryzen 9 7950X, Linux x86-64 masked floating-point exceptions.

  • Exact candidate 832e925592 built the actual libc and the math/Dinkumware test executables; guest_math, guest_math_exact and guest_dinkumware_internals pass (3/3).
  • Same-test control 9a9156e541, with production unchanged from #10314, fails guest_math specifically at log1p reduction: for the upward-rounding case. Dinkumware passes. The initial CTest selection also listed an unbuilt guest_math_exact; it was then built and passes on the final candidate. This missing executable is retained in the evidence, not counted as a numeric failure.
  • Fresh actual parent/candidate library comparisons: 905 finite nonnegative inputs × 4 rounding modes × 4 DAZ/FTZ combinations × 3 sticky seeds = 43,440 calls per arm, checking bits, errno, SSE/x87 flags and controls. Inputs include adjacent representable values around 1, the reduction boundary and large-exponent boundary, subnormal edges and deterministic random values. Both bundled FAR (PPSA03766) and Tetris (PPSA07923) libraries agree on every observation. Parent: 12 result-bit mismatches (the reported input under upward rounding, repeated across the environments); candidate: zero mismatches in every checked field. No changes in nearest, downward or toward-zero results in this sample.
  • CPU fixture rejects AGC/VideoOut/Vulkan mappings. Reference module hashes and candidate library identities are recorded. No SDK binaries, disassembly or game assets are attached.
  • Diff check and conventions pass. Local merge-tree check is clean against main 19cb822f84; this is a mergeability check, not a fresh build of that main integration. PR overlap checked; required parent and independently overlapping follow-ups are identified above.

Source patch, regression/probe, raw observations, exact identities and complete test logs, SHA-256 6e2b0f3baec6108f421621633d6ce78e43019c9069ec728dec05ad71955251f0.

The fresh matrix is scoped to finite nonnegative arguments and is not exhaustive. The regression preserves both exception banks and errno. Other arguments retain the parent implementation, including its separate pole/domain gaps tracked by #10512. Windows, unmasked traps, physical consoles, games and FPS were not tested or claimed.

Current Linux qualification (2026-10-28)

Rebased onto main 2227f1366188cda5699dd20e2e756a18006a5d4b. Linux CPU validation on 2026-10-28 at ac22f8e53ca3aa184d23c37b4498795915bce972 (Arch Linux 7.2.9, AMD Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON).

libc, guest_math_tests and guest_math_exact_tests rebuilt from this exact source. guest_math and guest_math_exact each passed three consecutive runs (6/6, no skips); the same two suites each passed three runs on the pinned main (6/6). Conventions and whitespace checks pass.

Exact source pins, preservation proofs, dependency checks, build logs and JUnit, SHA-256 1176269c9e6948b5252a5db9e660978d7f978fb2d9f4ed6c68bc050b10b5ae68. This is focused Linux CPU qualification; earlier Windows/title/reference measurements retain their original pins. No new title or performance result 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
  • 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: none (#10314 merged at 63a863d3b07f; present in audited main 3fea2a937ba)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4994186610 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10546). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-24T09:20:53Z. --- ### What Stacked follow-up to #10314. For `log1p(0x3fefffffffffffff)` with upward rounding, the port returns `0x3fe62e42fefa39ef`; two supplied titles’ bundled libraries return `0x3fe62e42fefa39f0`. Form the positive-exponent range-reduction correction as `1 + (x - u)` instead of `1 - (u - x)`. The mathematical value agrees, but rounding the inner subtraction in the opposite direction changes the correction. This is one generic expression change, with a 48-call regression covering four rounding modes, four DAZ/FTZ combinations and three sticky-flag seeds; no input-specific production branch. Only the reduction association and its regression are new relative to refreshed parent `185098a39d9179907e11d15fa9a58b27e6aac306`. This branch retains #10314’s implementation and history; #10314 has since merged into main. #10512 independently fixes the parent’s pole/domain exception behavior and is not included or required here. Both follow-ups should be retained when integrating the parent. #10315 also contains the same parent for its separate atanh work; it does not supply this correction. Shared GuestMath/debt insertion overlaps with other math topics require preserving their cases after whichever lands first. No unrelated topic is a dependency. ### Tested <!-- codex-maintenance-20261109-cpu-10546 --> **Current-main integration — 2026-11-09 UTC.** Head `6b7c1426b7f594503e1979e667b8b2c52ecb338a` preserves public head `e870883c659f5874cdd0eb824ee4ed196f4f7306` and integrates pinned main `7259cce11195f360698772da8c0b3af756bf7c8f`. Conflict resolution retains both the topic and main's newer source/test/debt changes; maintainer commits and attribution remain intact. Linux x86-64, GCC 16.2.1, Ninja Release: actual libc/libkernel and focused fixture owners rebuilt. **12/12 CPU executions pass, zero skips** (4 groups × three repetitions): `guest_math`, `guest_math_elementary`, `guest_math_exact`, `guest_dinkumware_internals`. `public_headers`, conventions and whitespace checks pass. The matching plain-main control passed 102 selected CPU executions and its header audit. CPU fixtures execute unpatched production libraries; this is not a full SDK or patched-title runtime qualification. No new Windows/macOS, console, GPU, title or performance result is claimed. Source checks preserve the existing production topic; historical reports below retain their original pins. [Build/test logs, exact heads, source/ancestry checks and provider pins](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/cpu8-main7259-linux-20261109.tar.gz), SHA-256 `52727be6594b9c15bf9a5535fef374b985e9526aabe5f3ef5cf5857dfeeb1a0d`. The public archive and all 178 manifest files were download/hash verified. <!-- codex-math-refresh-main1859-20261105-10546 --> **Latest integration (2026-11-05):** head `c1decc6bdbe50fe4cf461252e953e9313ec8405e`, tested on main `1859e6af1cad6e19e0c79530bca8f4d6c1d43a82`. This supersedes the integration pins in earlier reports below. Main now includes the atanh port #10315; its new regressions and the hypot regressions are retained alongside this PR's cases. Fresh Linux Release qualification: the actual libc CMake owner plus `guest_math`, `guest_math_exact` and `guest_dinkumware_internals`, each repeated three times on main and this head, all pass with zero skips. The frozen branch math fixture fails with the baseline library and passes again with its own restored library. Conventions and whitespace pass; final merge preview against main `6a337633c649805fb469960e53d43ec612e6e6d3` is clean. Fresh validation is CPU-only; earlier Windows/module reports remain at their recorded pins. [Source diffs, exact pins, actual-owner recipe, build/test/JUnit/control logs and binary/provider hashes](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-four-main1859-linux-20261105.tar.gz), SHA-256 `ad099369f7cae288f5353e8aeb196df80367b61ddc8454cf939a5dc522dbba1b` (download verified). No new SDK-module sampling, whole-project, Windows or title-performance result is claimed. <!-- /codex-math-refresh-main1859-20261105-10546 --> <!-- codex-numeric-refresh-20261105-10546 --> **Current integration — 2026-11-05.** Head `c2b06b93aa8e7afd0ba18d3e6efe28eabdf3c404` includes pinned main `6d173c1a19788ff69d43b3d0ca62833e312ef939` and retains the previous public history, notices, main math implementations and actual prerequisites. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; `guest_math`, `guest_math_exact` and `guest_dinkumware_internals` each pass 3/3 (9 passes, zero skips). The same groups pass 3/3 on pinned main. Source/parent/macro/notice checks and conventions pass. All 34 recursive provider trees / 31,551 tracked blobs verify before and after the gate; QuickJS test262 is excluded as declared update=none test data. **Shared main blocker:** `public_headers` fails on this head and pinned main for the same five missing `WKSecurityOrigin` declarations. [PR #16010](https://github.com/boykopovar/AnyPS5/pull/16010) restores them separately; a maintainer needs to merge that fix and rerun required checks. This math branch does not contain the unrelated WebKit patch. Header audits and all required CI are not claimed green. The older Windows compile failure in `DepthSurface.cpp` was a shared main API mismatch, fixed upstream by merged [PR #15855](https://github.com/boykopovar/AnyPS5/pull/15855), already included in this head. Its own [hosted Windows compile job passed](https://github.com/boykopovar/AnyPS5/actions/runs/41901908835/job/126840906295); this is not a fresh Windows qualification of this math head. [Immutable source/audit/log/JUnit/hash and exact-lease push evidence](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/numeric5-main6d-linux-20261105.tar.gz), SHA-256 `ef9e085442553c0fce1a4a6ce15781e4e890dc001a3424e1ef972f9b769f3065` (download and member hashes verified). Earlier dated platform/negative/reference reports retain their original source pins. No new Windows, console/SDK-module, GPU/title, exhaustive or performance result. AI-assisted: yes, Codex Sol6.1 medium. All earlier qualification text below is historical and retains its recorded source/platform pins, including earlier linear/no-merge descriptions. <!-- libc-main9ab-refresh-20261104-10546 --> **Current-main refresh — 2026-11-04.** Head `c339b78f59c59dec8588f51ed8f66b633b6230c7` merges main `9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c` while retaining the prior public head as an ancestor. Main’s newer code, regression fixtures and debt entries are preserved alongside this topic. Linux x86-64, GCC16.2.1, Ninja Release: actual libc, libkernel and libSceAmpr CMake owners rebuilt coherently. `guest_math`, `guest_math_exact`, `guest_dinkumware_internals` each pass three consecutive runs (**9 passes, zero skips**). The same groups pass three times on pinned main. Public-header audit and conventions pass. Original licence-notice trailing whitespace is retained where present. The scoped recipe reuses frozen ZArchive/zstd providers; this is not a whole-project build. No new Windows, bundled-SDK, physical-console, title/GPU or FPS measurement is claimed; earlier reports retain their original pins. [Exact source/parent proofs, per-branch patches/input manifests, build and CTest logs/JUnit, library/executable hashes and scoped CMake recipe](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-libc11-main9ab-linux-20261104.tar.gz), SHA-256 `97a2377bc996be1690e8853e1ea090a98b5ed808bcc37a15a5cdada5c2e00845` (download verified). AI-assisted: yes (Codex). **Current-main integration — 2026-11-03.** Head `8ea47fedc8a0fb252480bf9c7af76d5265684d9a` includes main `4f41f4c375f5abb487dbd184fbc150f31994d762` and retains the prior public history and attribution/licence notices. Main’s newer math implementations and fixtures remain alongside this topic. Linux x86-64 Release, GCC 16.2.1, Ninja, BUILD_TESTING=ON: rebuilt actual libc and math executables. `guest_math`, `guest_math_exact`, and `guest_dinkumware_internals` each pass 3/3 (**9 passes, zero skips**); `public_headers` and conventions pass. The same three groups pass 3/3 plus headers on pinned main. All 34 recursive dependency trees and 31,551 tracked blobs verify with zero errors; the update=none QuickJS test262 corpus is excluded from these library inputs. Whitespace check passes. Source/parent/gitlink proofs, exact library/test hashes, raw logs/JUnit, and head-leased push receipts: [qualification archive](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math15-main4f41-linux-20261103.tar.gz), SHA-256 `e6a50522bc28e30871fdc2c12a88d2537515914239e8166f6237f48895126a06` (download verified). Older platform/reference reports retain their original pins; no new Windows/macOS, SDK-module, console, title/GPU or performance claim. AI-assisted: yes (Codex). Earlier dated qualifications below retain their recorded source/platform pins. **Current-main integration (2026-11-02):** `59a2d4e415ec29bc4f37af9e2ed83a46b623c96f` includes main `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8` and retains the existing public commits. Conflicts preserve main’s math implementations, regression checks and debt entries alongside this topic. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; `guest_math`, `guest_math_exact` and `guest_dinkumware_internals` each pass three times (9 passes, zero skips), and `public_headers` passes. The same baseline groups pass on main; conventions and whitespace pass. Source and dependency blobs, executable/library hashes, raw logs and JUnit are retained. This refresh adds no new console, Windows, title, GPU or numerical-reference measurement. [Qualification evidence](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-root14-maina4eca-linux-20261102-terminal.tar.gz), SHA-256 `22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52` (download verified). <!-- codex-main-refresh-20261027-pr10546 --> **Current-main conflict refresh, 2026-10-27 UTC:** exact head `ffec55dd7c891fe641fd86ee16da69e398763ac4` on tested main `74acfad65b3f0fd4eab653f3a3989d298fba1157`. Resolved overlapping test/debt context while preserving this branch's authored production/test edits and main's nextafter environment implementation and coverage. Existing prerequisite commits remain in their original series order. Linux focused rebuild of `libc` and selected test executables passes `guest_math` and `guest_math_exact`, each three times: **6 passes, zero skips**. Conventions and whitespace checks pass. Final fetched main `cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f` merges cleanly; its later change is an unrelated Windows crash-test pattern, and the executed qualification remains pinned to the stated base. No new Windows, console, GPU, title, full-suite or negative-control run is claimed. Earlier reference/Windows evidence keeps its original pins. [Exact pins, branch patches, preservation proofs, build/test logs, JUnit and lease-push receipts for this refresh batch](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math14-main74acfad-linux-refresh-20261027.tar.gz). SHA-256: `e33f98cc467f038af662cc5fa491c3acc1806bb47171cf77b748f0d4d052c1f2`; downloaded copy verified. Refreshed head `3e3758ce7a29959120b8915157137fdf63ce7e7c`: two topic commits directly on current #10314 `185098a39d9179907e11d15fa9a58b27e6aac306`, based on main `6c7a3256f25d2ea56702d06a2283ecc27ff133b3`. A local merge-tree check with main `8b426927d7d91c137e6f4704acc860f060a2798a` is clean. The original log1p implementation and regression function are preserved, with main’s public libc declarations retained. The entire production file differs from the immediate parent by the single original correction expression. Fresh Linux x86-64 Release: libc and all three math targets rebuilt; `guest_math`, `guest_math_exact`, `guest_dinkumware_internals` and `public_headers` each pass three repeats. Same final tests with the immediate parent’s Math.cpp fail at `log1p reduction: input=3fefffffffffffff mode=2`; exact-math and Dinkumware controls pass. Restored candidate passes all four groups three times and restores a byte-identical libc. Conventions/whitespace pass. No original-library matrix, Windows, whole-title or performance comparison was repeated. [Fresh exact-head logs, negative/restoration checks, source proof and patch](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr10546-head3e3758ce-parent185098-linux-validation.tar.gz), SHA-256 `99bb969b2e692880d5e3356e3bfdb8b8b42da580184ce215314bc265756d256b`. #### Earlier qualification (historical source pins) Arch Linux 7.2.9, GCC 16.2.1, Ryzen 9 7950X, Linux x86-64 masked floating-point exceptions. - Exact candidate `832e925592` built the actual libc and the math/Dinkumware test executables; `guest_math`, `guest_math_exact` and `guest_dinkumware_internals` pass (3/3). - Same-test control `9a9156e541`, with production unchanged from #10314, fails `guest_math` specifically at `log1p reduction:` for the upward-rounding case. Dinkumware passes. The initial CTest selection also listed an unbuilt `guest_math_exact`; it was then built and passes on the final candidate. This missing executable is retained in the evidence, not counted as a numeric failure. - Fresh actual parent/candidate library comparisons: 905 finite nonnegative inputs × 4 rounding modes × 4 DAZ/FTZ combinations × 3 sticky seeds = **43,440 calls per arm**, checking bits, errno, SSE/x87 flags and controls. Inputs include adjacent representable values around 1, the reduction boundary and large-exponent boundary, subnormal edges and deterministic random values. Both bundled FAR (PPSA03766) and Tetris (PPSA07923) libraries agree on every observation. Parent: 12 result-bit mismatches (the reported input under upward rounding, repeated across the environments); candidate: **zero mismatches in every checked field**. No changes in nearest, downward or toward-zero results in this sample. - CPU fixture rejects AGC/VideoOut/Vulkan mappings. Reference module hashes and candidate library identities are recorded. No SDK binaries, disassembly or game assets are attached. - Diff check and conventions pass. Local merge-tree check is clean against main `19cb822f84`; this is a mergeability check, not a fresh build of that main integration. PR overlap checked; required parent and independently overlapping follow-ups are identified above. [Source patch, regression/probe, raw observations, exact identities and complete test logs](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/libc-log1p-reduction-head832e9255-linux-validation.tar.gz), SHA-256 `6e2b0f3baec6108f421621633d6ce78e43019c9069ec728dec05ad71955251f0`. The fresh matrix is scoped to finite nonnegative arguments and is not exhaustive. The regression preserves both exception banks and errno. Other arguments retain the parent implementation, including its separate pole/domain gaps tracked by #10512. Windows, unmasked traps, physical consoles, games and FPS were not tested or claimed. <!-- 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. --> <!-- codex-math-refresh-20261028-repeat-pr10546 --> ### Current Linux qualification (2026-10-28) Rebased onto `main` `2227f1366188cda5699dd20e2e756a18006a5d4b`. Linux CPU validation on 2026-10-28 at `ac22f8e53ca3aa184d23c37b4498795915bce972` (Arch Linux 7.2.9, AMD Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON). `libc`, `guest_math_tests` and `guest_math_exact_tests` rebuilt from this exact source. `guest_math` and `guest_math_exact` each passed three consecutive runs (6/6, no skips); the same two suites each passed three runs on the pinned main (6/6). Conventions and whitespace checks pass. [Exact source pins, preservation proofs, dependency checks, build logs and JUnit](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math25-main2227-linux-20261028-repeat.tar.gz), SHA-256 `1176269c9e6948b5252a5db9e660978d7f978fb2d9f4ed6c68bc050b10b5ae68`. This is focused Linux CPU qualification; earlier Windows/title/reference measurements retain their original pins. No new title or performance result 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) - [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: none (#10314 merged at `63a863d3b07f`; present in audited main `3fea2a937ba`) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-24 09:38:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T09:38:50Z.

Review: APPROVED


Reviewed head 832e9255929fbfad76fda9fc0c99cdf135715ada. The production change is limited to the positive-exponent reduction correction in the FreeBSD-derived log1p path; the alternate association is consistent with the reference algorithm and the target-binary evidence described in the PR. The regression exercises all four rounding modes, DAZ/FTZ combinations, seeded sticky flags, and the input that exposes the mismatch. I checked the full diff and the PR’s hosted checks; no blocking issue found. Approval is based on the scoped Linux CPU evidence and does not imply a console or Windows run.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5637788798 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10546#pullrequestreview-5637788798). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T09:38:50Z. **Review:** APPROVED --- Reviewed head `832e9255929fbfad76fda9fc0c99cdf135715ada`. The production change is limited to the positive-exponent reduction correction in the FreeBSD-derived `log1p` path; the alternate association is consistent with the reference algorithm and the target-binary evidence described in the PR. The regression exercises all four rounding modes, DAZ/FTZ combinations, seeded sticky flags, and the input that exposes the mismatch. I checked the full diff and the PR’s hosted checks; no blocking issue found. Approval is based on the scoped Linux CPU evidence and does not imply a console or Windows run.
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!10546
No description provided.