docs(libc): record nearbyintf, getw, putw, __isfinitel and _FSinh measured on a PS5 #10134
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10134"
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 orezraey on 2026-10-23T10:35:35Z.
What
Five libc debt entries said their console behaviour was unmeasured. I measured them on a retail PS5 (firmware 13.60) with a homebrew probe calling
libSceLibcInternal.sprxfrom a payload process. The source and console log are in this gist (libc2). Only the debt file changes.strtonumis not exported bylibSceLibcInternal.sprx, so a payload cannot call it there.nearbyintfrounds with the MXCSR mode. With the x87 mode set to upward and MXCSR to nearest it rounds 2.5 to 2; with MXCSR upward it gives 3. All four modes give the results the host gives, so AnyPS5 already matches. The console also raisedFE_INEXACTfor those inputs, which the host does not; the entry records it.getwandputwmatch: two words written little-endian, -1 with end of file after them and for a 2-byte file, and -1 with the error flag forputwon a read-only stream.__isfinitelmatches: 1 for 0, -0, 1, a denormal and ±1e4000, and 0 for a NaN and for the maximum exponent without the integer bit._FSinhand_FCosh: 12 of 36 results differ from the console by one unit in the last place, namely_FSinh(0.5, y),_FCosh(1, y)and_FCosh(10, y)for y of 0.5, 1 and 2. Zeros, the overflow to infinity at 89 and 90, and the tiny-argument results matched. Matching bit for bit needs the console's float algorithm, so this records the gap.Tested
tools/check_conventions.pypasses. Documentation only.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:51:09Z.
Review: CHANGES_REQUESTED
The documentation is supported by the linked firmware 13.60 probe: the nearbyintf rounding/MXCSR observations, getw/putw results,
__isfinitelclassifications, and the sampled_FSinh/_FCoshcomparisons match the reported log. Exact-worktree conventions, diff-check, and main-sync pass (3 ahead/29 behind; merge clean); no runtime test applies to this documentation-only change. Please coordinate thedocs/dev/debt/libc.mdmerge with #10129: the pairwise heads conflict in the adjacent guest-time-conversion /__isfinitelsection, so preserve both updates in one refresh. AddDepends ononly if one actually needs to land first. Hosted eligibility/intake/conventions/labels pass; product jobs are skipped for documentation-only paths.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T13:59:51Z.
Review: APPROVED
Re-review of exact current head
aeb84055253aa07cf8d096fc48dbe9658efa1e80. This documentation-only change is backed by the linked firmware 13.60 probe and clearly records the observednearbyintf,getw/putw,__isfinitel, and_FSinh/_FCoshresults, including the measured one-ULP differences. Exact-head conventions andgit diff --checkpass; hosted eligibility, conventions and labels pass, with product jobs skipped for the documentation-only path.The prior integration concern with #10129 is addressed: #10129 now explicitly declares
Depends on: #10134and carries the #10134 debt change until this PR lands. That preserves both adjacent documentation edits. Approving this exact head.Pull request closed