The libc.prx that titles ship evaluates the rational step as
((Q(z) + g*P(z)) + 1) / ((Q(z) - g*P(z)) + 1), with its own ln 2 split
and coefficients in the double case, and returns 1 only for arguments
within half an epsilon of zero. main used a different rational form
with a doubling step and an epsilon-wide shortcut, which left about one
result in five one ulp away from titles.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A nonzero subnormal result from _Stodx, _Stofx or _Stoldx sets neither
errno nor the error argument; only underflow to zero and overflow do.
_Stofx used to keep the ERANGE that strtof sets for an inexact
subnormal. Measured by running firmware 13.60's libSceLibcInternal.sprx
in a Linux host process, not on a console.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
_Stodx, _Stofx and _Stoldx scale the decimal exponent before rounding
and report a range error through their error argument; _Stof and _Stold
wrap them. _Stollx, _Stolx, _Stoulx and _Stoullx report strtoll and
strtoull errors through the same argument, and _Stoll now goes through
_Stollx as the firmware does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
_Stod applies its power-of-ten scale to the decimal exponent before
rounding, _Stoll is strtoll, and _Sin, _FSin, _LSin, _Log and _FLog pick
the public function the firmware dispatches to.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK