Commit Graph
23 Commits
Author SHA1 Message Date
Adrià eca9a2cc9c Merge pull request #15484 from Danigamer05/feat/libc-sce-v2-log-gamma-20261103
feat(libc): export the std::__sce_v2 _Poly and _XLgamma helpers
2026-11-08 03:06:31 +01:00
Dean 628480a9be Merge pull request #15519 from Danigamer05/feat/libc-sce-v2-pmsw-20261103
feat(libc): export the std::__sce_v2 _Pmsw, _FPmsw and _LPmsw helpers
2026-11-08 02:17:57 +13:00
Danigamer05andClaude Opus 5.5 5dd6d283f3 feat(libc): export the std::__sce_v2 _Pmsw, _FPmsw and _LPmsw helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:04:00 +01:00
Danigamer05andClaude Opus 5.5 694cf319cf feat(libc): export the std::__sce_v2 _Exp and _FExp helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:55:07 +01:00
Danigamer05andClaude Opus 5.5 5609e53b0e feat(libc): export the std::__sce_v2 _Poly and _XLgamma helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 15:42:27 +01:00
Dean 67ea76b38b Merge pull request #15099 from Danigamer05/feat/libc-sce-v2-binary-scaling-20261102
feat(libc): export the std::__sce_v2 binary scaling helpers
2026-11-03 21:10:53 +13:00
Dean 5da7b55068 Merge pull request #14955 from Danigamer05/feat/libc-sce-v2-float-helpers-20261102
feat(libc): export the std::__sce_v2 float classification, integer-part and normalization helpers
2026-11-03 18:12:24 +13:00
Danigamer05andClaude Opus 5.5 1c5093f845 feat(libc): export the std::__sce_v2 binary scaling helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 16:12:20 +01:00
Dean 2b1517a900 Merge pull request #12313 from JJenkx/windows/libc-floor-rounding-math
fix(libc): keep floor and floorf at +0 for small positive values when rounding down
2026-11-03 02:37:03 +13:00
Danigamer05andClaude Opus 5.5 a99455ab20 feat(libc): export the std::__sce_v2 float classification, integer-part and normalization helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 05:24:50 +01:00
Dean 6d0fc32dea Merge pull request #8397 from hypermoist/feat/libc-dinkumware-float-bits
feat(libc): add Dinkumware float bit helpers from firmware
2026-11-02 13:43:07 +13:00
Qu Yi 4c41442276 fix(libc): match nearbyint inexact flags to guest libc 2026-10-31 15:51:17 +08:00
JJenkxandClaude Opus 5.5 797226298a fix(libc): keep floor and floorf at +0 for small positive values when rounding down
Math.cpp is built without -frounding-math, so GCC inlines std::floor
as an add-and-subtract-2^52 sequence that is only exact when rounding
to nearest. With FE_DOWNWARD it returned -0 for +0, 0.1, 0.5 and
positive subnormals, where titles' libc.prx returns +0. Define floor
and floorf in MathExact.cpp, which is built with -frounding-math for
this reason, next to rint and rintf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:47:24 -04:00
Henryisdjfunkyho 472500cb80 fix(libc): honor rounding modes in nearbyintf 2026-10-28 22:06:25 -07:00
Dean 1d8bcebafe Merge pull request #12237 from JJenkx/windows/libc-lrint-indefinite
fix(libc): return the integer indefinite from lrint and llrint out of range
2026-10-29 12:11:19 +13:00
JJenkxandClaude Opus 5.5 86b89d7de9 fix(libc): return the integer indefinite from lrint and llrint out of range
Titles' libc.prx converts lrint, lrintf, llrint and llrintf with
cvtsd2si and cvtss2si, so NaN, infinities and values outside the int64
range return INT64_MIN. On Windows they went through UCRT's llrint,
which returns 0 there. Use the same SSE conversions. They round in the
current mode, raise the same exception flags and leave errno alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:16:15 -04:00
Alexandre Figueiredo 8130d344ea fix(libc): classify x87 unnormals as denormal in _LDtest and _LDclass 2026-10-27 13:26:57 +00:00
hypermistandClaude Opus 5.5 ea9ba13bc8 Merge remote-tracking branch 'upstream/main' into feat/libc-dinkumware-float-bits
Resolved cleanly; no conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:11:08 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
hypermistandClaude Opus 5.5 af0e82ed86 fix(libc): take the guest's 64-bit long exponent in _Dscale
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 13:20:32 +02:00
hypermistandClaude Opus 5.5 b94f257415 feat(libc): add Dinkumware float bit helpers from firmware
Add _Dint, _Dscale, _Dunscale, _Dnorm, _Fpcomp and _Poly with their
float and long double forms, matching libSceLibcInternal bit for bit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 13:20:32 +02:00
hypermistandClaude Opus 5.5 1181068a68 fix(libc): keep exact math results independent of the host libm
drem, dremf, remainderl and remquol now set EDOM themselves for an
infinite x or a zero y, as fmodl does. Apple's libm never sets errno and
MinGW skips it for long double, so the host could not be relied on.

Guest long is 64 bits, but the host long is 32 bits on Windows. The
lrint, lround and scalbln exports now take and return std::int64_t,
round through llrint and llround, and clamp scalbln exponents to the int
range, where the result is already infinite or zero. The test uses
INT64_MAX instead of LONG_MAX and covers remainderl, dremf and a 2^40
lrint result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:45:08 +13:00
hypermistandClaude Opus 5.5 4f608a8c49 feat(libc): add exact long double and BSD math exports
copysignl, fdiml, fmodl, remainderl, remquol, logbl, ilogbl, rintl, roundl,
lroundl, lrintl, llrintl, sqrtl, modfl, nanl, scalblnl, fmal, rint(f),
lrint(f), llrint(f), drem(f), scalbln(f), scalb(f), finite(f),
__fpclassifyl, __isinfl, __isnanl, __isnormall, _LDtest, _Dclass, _FDclass,
_LDclass and _LDsign, matching the libc.prx bundled with PPSA08427 bit for
bit, including NaN propagation, errno and FreeBSD fmal special cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
2026-10-16 01:38:41 +13:00