fix(libc): preserve frexpf decomposition and exception behavior #11074
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11074"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-25T17:00:57Z.
What
The host
std::frexp(float)changes signaling-NaN payloads and flags, and ignores the bundled implementation's subnormal scaling and DAZ behavior.frexpfnow decomposes the exponent bits, scales only subnormal inputs by2^25, and returns zeros/infinities/NaNs unchanged with exponent0. Normal inputs stay independent of the rounding mode. The implementation is derived from the bundled PPSA03766 function; there is no new export or dependency.Tested
Linux / GCC16.2.1 / Release, head
7cfbb837c43378e5b2138b1a2cbaee16bdd0d1c5on main5949d8bf924b0f3b01c1c4e5e82b2e8ddabd9b97.guest_math,guest_math_exact,guest_dinkumware_internals), each passing3 repeats before and after the negative control.std::frexpfails the committedguest_mathregression at the first subnormal's flags. Restoring the implementation passes all repeated groups and produces a byte-identical libc library.Conventions and whitespace pass. Clean local merge-tree against newer main
6b1f419fefbde12c0fdad3299a294487dc427e44; exact built/tested base remains5949. The overlap scan's45 shared-file cases have no changedfrexp/frexpfimplementation or callers; #8937 and #10953 have independent additive debt entries at the same location. Retain both rows when reconciling; no functional dependency. Combined branches were not runtime-tested.Source patch, numeric reference observations, full matrices, regression/negative-control logs and restoration proof — SHA-256
7a75885add6e2691d06ad91fc4d2784fbf54b7a185c1050ce0c2856b634de5e6. The downloaded asset was hash-verified. No proprietary module binaries, extracted instructions or game assets are included.Windows/macOS, unmasked exceptions and native titles were not tested. No game-unblock, FPS or new-function-count claim.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)