fix(libc): follow msun for coshf #10001
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10001"
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 MarcZX10 on 2026-10-23T03:36:37Z.
What
coshfcurrently forwards to the Windows host library. The #9707 survey reports 500,554 and 500,614 result-bit differences from the two bundledlibc.prxbuilds over 20 million inputs. This ports FreeBSD msun'se_coshf.crange handling and reuses the existingexpfandexpm1fpaths used bysinhf. It covers small inputs, the finite ranges, overflow, infinities and NaNs.The survey establishes host-versus-title differences, not the exact implementation used by every console library. This change follows the cited msun algorithm; the exact system
libSceLibcInternalbehavior and FMA-contractedlibc.prxresults remain unverified, as recorded in the debt entry.Tested
Math.cppandGuestMath.cpp.std::coshrounded to float (within 2 ULP).GuestMath.cppcompiled. A standaloneMath.cppcross-compile is blocked by existing Bessel wrappers callingj0,j1,jn,y0,y1andyn, which MinGW does not declare.guest_mathtarget was not run.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)