feat(libc): implement the hyperbolic functions #2166
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2166"
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-09T10:31:28Z.
What
Exports
sinh,cosh,coshf,asinh,asinhf,acosh,acoshfandatanh. Each one forwards to the C++ standard library, like the existingtanh/tanhfandsin/cos. Only the variants that titles import are added.Titles: open-source homebrew from the #1578 catalog audit imports them from
libSceLibcInternal(resolved throughlibc.prx), for example:cosh,coshf,sinh,asinh,asinhf,acosh,acoshfsinh,cosh,asinh,acosh,atanhsinh/cosh/asinhI haven't run any of these titles.
Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:CheckHyperbolicinguest_math_tests:sinh(±0)keeps the sign,cosh(0) == 1,acosh(1) == 0,atanh(±1) == ±inf;acosh(0.5),acoshf(0.5f),atanh(2);doubleand 1e-6 forfloat;sinh,asinhandatanhof1e-300return1e-300,cosh(710.4)andsinh(-710.4)stay finite, andasinh(-1e300)/acosh(1e300)are ±691.4686750787736.sinh,coshorasinhwith the textbookexp/logformula makesguest_mathfail.cmake --build build --target libs: the patchedlibc.prxexports all 8 NIDs.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap. The new lines sit next tosin/cos, away from #2050's_FSinh/_FCoshchange.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-09T10:31:50Z.
Progress report (
51f69aa→d6129e5)📈 System libraries: 84.73% (+0.04%, +8 implemented functions)
✅ 8 implemented
acosh_nid_postfixacoshf_nid_postfixasinh_nid_postfixasinhf_nid_postfixatanh_nid_postfixcosh_nid_postfixcoshf_nid_postfixsinh_nid_postfixImported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-09T11:24:35Z.
Full Linux and Windows builds and tests for this head (
d6129e5a), 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/37920405682
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:09:20Z.
Closing for the same reason as #2158: these come from the import audit, and none is shown to be a title's next stop on main. Reopen with the title ID and the log line when one stops on them.
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T04:24:14Z.
For the record, in case this comes back: according to @babyhuey's run on #2174 (main
c963432d), ProsperoTV (PPSA99003) moves past__isinfwith #2174 and then stops atZjtRqSMJwdw, which issinh, one of the functions this PR adds. Their Windows log line isFAIL: unresolved ELF import ZjtRqSMJwdw from libSceLibcInternal.prx. So this becomes a title's next stop as soon as #2174 is in. I'll rebase it then if you'd like to reopen it.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T00:33:50Z.
@AchrafReyani with
alarm(#2765) merged, Porpoise (PPSA99764) now stops atasinhonmain06da1176(catalog build,sce_module/libc.prxunwrapped):app.elf: symbol lookup error: app.elf: undefined symbol: 2eQpqTjJ5Y4. That's the condition you mentioned for rebasing this.Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T00:47:24Z.
Thanks @babyhuey, resubmitted as #3190, rebased onto current
mainwith your Porpoise stop.Pull request closed