fix(libc): raise inexact for tiny asin and atan inputs #23972
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23972"
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 HighDaddyLudo on 2026-11-19T23:41:23Z.
What
The tiny-input paths in double-precision
asinandatanreturned the input without raisingFE_INEXACT. The libc.prx comparison in #23411 reports this discrepancy. FreeBSD 11.4 msun raises inexact for nonzero inputs in the corresponding paths.Raise
FE_INEXACTfor nonzero inputs at the existing cutoffs. The regression check covers preserved result bits, signed zero, subnormal inputs and unchangederrno.Tested
GuestMathregression check against the relevant functions fromMath.cpp. It failed onmainand passed with this change.guest_mathCTest and a Windows runtime run are pending.mainatdd9b766645. The overlap script received HTTP 403. Targeted GitHub searches found no competing fix for these two functions.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 PrivacyOnion on 2026-11-19T23:50:59Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3dfb4fbfe7:tools/check_conventions.pypassed.guest_math_testsbuilt cleanly.guest_math):core/libs/prx/libc/src/Math.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:13:26Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change based on the code reviewed; the full
guest_mathCTest and Windows runtime check remain pending.What I ran
Reviewed head
3dfb4fbfe7ff65e770a47cd865ebc0b599d69f17. No commands or tests were run; the author-reported checks in the PR description were not independently run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not run the focused regression, full
guest_mathCTest, syntax checks, or Windows runtime check. Readcore/libs/prx/libc/src/Math.cppandcore/libs/tests/GuestMath.cpp;manifest.jsonlists both changed files as reviewed and included. The attempted read offiles.jsonwas unavailable; no excluded files were identified from the manifest.To get this to a good state
Nothing is required.