feat(libc): implement sinl, cosl, logl, powl and truncl #2213
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2213"
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 reyani-dev on 2026-10-09T11:46:45Z.
What
Exports the
long doubleversions ofsin,cos,log,powandtrunc. Each one forwards to the C++ standard library inlong double. The guestlong doubleis x87 extended precision, asstrtold_nid_postfixalready relies on (static_assert(sizeof(long double) == 16)), and both host ABIs use that format withAPS5_VABI.Title: PPSA99169 RetroArch imports all five from
libSceLibcInternal(resolved throughlibc.prx), per the #1578 audit. I haven't run the title.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:guest_math_tests, next tofrexpf. Each needs the 64-bit significand, so an implementation throughdoublefails:truncl(2^62 + 1.5) == 2^62 + 1(doublerounds the input to 2^62), andtruncl(-0.5)is-0;logl(1 + 2^-60)is 2^-60 within 1e-9 relative (double: 0);powl(1 + 2^-60, 2) == 1 + 2^-59(double: 1), andpowl(2, 64) == 2^64;cosl(2^-31) < 1(the exact value 1 - 2^-63 rounds to 1 indouble);|sinl(π)| < 1e-18for the nearestlong doubleto π (doublesin of the nearestdoublegives 1.2e-16).doublemakesguest_mathfail.cmake --build build --target libs: the patchedlibc.prxexports all 5 NIDs.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T11:47:12Z.
Progress report (
d70b899→7c8e142)📈 System libraries: 84.72% (+0.03%, +5 implemented functions)
✅ 5 implemented
cosl_nid_postfixlogl_nid_postfixpowl_nid_postfixsinl_nid_postfixtruncl_nid_postfixImported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-09T12:13:55Z.
Full Linux and Windows builds and tests for this head (
7c8e142c), using the project's Build workflow. I can't start the upstream manual run, so I ran the samebuild.ymlin my fork through a mirror PR. Like the upstream run, the jobs check out the PR head merged into currentmain(d70b8998):ctest: 516/516 passedctest: 507/507 passedRun: https://github.com/AchrafReyani/AnyPS5/actions/runs/37925841113
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:10:07Z.
Same as #2167, for
sinl,cosl,logl,powlandtruncl.Pull request closed