feat(libc): implement sinhf #3597

Closed
Recapi wants to merge 1 commit from upstream-pr/3597 into main
Recapi commented 2026-10-11 14:01:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-11T14:01:09Z.


What

Implements sinhf (1t1-JoZ0sZQ, libSceLibcInternal), the next stop of Ruffle Flash (PPSA68091, catalog 1.2.0) on main (#1578). It forwards to the host's std::sinh, like sinh, coshf and tanhf next to it.

Tested

Linux (Ubuntu, GCC, Release) on main a11c8f7. The catalog ZIP was checked against its sha256, eboot.bin and sce_module/libc.prx were unwrapped as #2605 requires, and the title was relinked with --registry and run in a sandbox with no network:

  • main: ./app.elf: symbol lookup error: ./app.elf: undefined symbol: 1t1-JoZ0sZQ
  • with this PR: ./app.elf: symbol lookup error: ./app.elf: undefined symbol: EDyhWelj7UY (pause)
  • guest_math passes 3/3 (--repeat until-fail:3). The new cases cover signed zero, a tiny argument, ±infinity, NaN, overflow at ±90 with ±89 still finite, and two values against sinh. check_conventions.py passes

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819607288 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3597). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-11T14:01:09Z. --- ### What Implements `sinhf` (`1t1-JoZ0sZQ`, libSceLibcInternal), the next stop of Ruffle Flash (PPSA68091, catalog 1.2.0) on `main` (#1578). It forwards to the host's `std::sinh`, like `sinh`, `coshf` and `tanhf` next to it. ### Tested Linux (Ubuntu, GCC, Release) on `main` a11c8f7. The catalog ZIP was checked against its sha256, `eboot.bin` and `sce_module/libc.prx` were unwrapped as #2605 requires, and the title was relinked with `--registry` and run in a sandbox with no network: - `main`: `./app.elf: symbol lookup error: ./app.elf: undefined symbol: 1t1-JoZ0sZQ` - with this PR: `./app.elf: symbol lookup error: ./app.elf: undefined symbol: EDyhWelj7UY` (`pause`) - `guest_math` passes 3/3 (`--repeat until-fail:3`). The new cases cover signed zero, a tiny argument, ±infinity, NaN, overflow at ±90 with ±89 still finite, and two values against `sinh`. `check_conventions.py` passes ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 14:01:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:01:30Z.


Progress report (a11c8f7 → 89ffad6)

📈 System libraries: 85.82% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libc sinhf_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109814770 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3597#issuecomment-6109814770). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T14:01:30Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 89ffad6) 📈 **System libraries**: 85.82% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libc | `sinhf_nid_postfix` | </details>
Recapi commented 2026-10-11 14:41:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-11T14:41:06Z.


Fork CI for this commit: run 38145811688. guest_math passes on Linux and Windows. The failures in that run are unrelated to this change, and the Windows ones are the same as in main's own run on a11c8f7 (38144471410):

  • Windows: guest_kernel_sys, windows_exceptions
  • Linux: agc_driver_emulated_color_compare, agc_driver_image_plane_address_on_li…, guest_kernel_stack_protect
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110167595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3597#issuecomment-6110167595). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-11T14:41:06Z. --- Fork CI for this commit: [run 38145811688](https://github.com/Recapi/AnyPS5/actions/runs/38145811688). `guest_math` passes on Linux and Windows. The failures in that run are unrelated to this change, and the Windows ones are the same as in `main`'s own run on a11c8f7 ([38144471410](https://github.com/boykopovar/AnyPS5/actions/runs/38144471410)): - Windows: `guest_kernel_sys`, `windows_exceptions` - Linux: `agc_driver_emulated_color_compare`, `agc_driver_image_plane_address_on_li…`, `guest_kernel_stack_protect`
blawesom commented 2026-10-11 15:20:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T15:20:17Z.


Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Builds; tools/check_conventions.py --base origin/main passes.
  • Full suite: 832/832 passed (all tests including the Vulkan suites on AMD RX 9070 XT / RADV).
    • Note: this overlaps the sinhf half of #3519, which has a dual-platform-verified branch (blawesom:verify/3519) covering sinhf and asinl together — linking for the reviewers' visibility.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110522236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3597#issuecomment-6110522236). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T15:20:17Z. --- Independent pre-review on **Linux** (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`. - Builds; `tools/check_conventions.py --base origin/main` passes. - Full suite: **832/832 passed** (all tests including the Vulkan suites on AMD RX 9070 XT / RADV). - Note: this overlaps the `sinhf` half of #3519, which has a dual-platform-verified branch (`blawesom:verify/3519`) covering `sinhf` and `asinl` together — linking for the reviewers' visibility.
Recapi commented 2026-10-11 16:01:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-11T16:01:28Z.


Closing in favour of #3725, which carries @screamm's sinhf from #3519. That port matches the console's msun code bit for bit, where this one is a host one-liner. Thanks @blawesom for pointing out the overlap.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110898392 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3597#issuecomment-6110898392). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-11T16:01:28Z. --- Closing in favour of #3725, which carries @screamm's `sinhf` from #3519. That port matches the console's msun code bit for bit, where this one is a host one-liner. Thanks @blawesom for pointing out the overlap.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3597
No description provided.