tanh returned the host's tanh, whose last bit differs from the titles' copy
on Windows. The titles' copy is FreeBSD msun's s_tanh.c over msun's expm1,
and it sets no errno. tanh now computes that algorithm over this file's
Expm1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
trunc, ceil, floor and nearbyint and their float forms returned the
host's result, which on Windows passes a signalling NaN through
unchanged. The titles' copies follow FreeBSD msun, which returns x + x
for a NaN, so the NaN comes back quieted with its payload and sign; these
functions now do the same before calling the host for other arguments.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
asinf left errno unchanged for |x| > 1, the infinities and NaN, following
included, stores EDOM there and leaves it alone for |x| <= 1; asinf now
does the same, and the test expects it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
asinf returned the host asin, so its last bit depended on the host: on
Windows it differs from the libc.prx that titles ship on 5,413,834 of the
floats in (-1, 1). That libc.prx is msun's e_asinf.c, which gives the same
bits as PPSA07923's and PPSA05916's copies for all 2^32 arguments. errno
is still left unchanged for |x| > 1 and NaN.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
logb and logbf returned the host's logb, which sets ERANGE for a zero
argument on Windows and returns signalling NaNs unquieted. The titles'
copies are FreeBSD msun's s_logb.c and s_logbf.c, which set no errno and
quiet a NaN through x * x; both functions now compute that algorithm.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
atan2f returned the host atan2, so its last bit depended on the host: on
Windows it differs from the libc.prx that titles ship on 7,126,466 of
200,001,024 sampled argument pairs. That libc.prx is msun's e_atan2f.c over
its atanf; with two NaN arguments it returns y's. The port gives the same
bits as PPSA07923's, PPSA05916's and PPSA13934's copies on every pair.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The _FSinh and _FCosh special-value checks read the raised flags with
fetestexcept(FE_ALL_EXCEPT). On macOS FE_ALL_EXCEPT also holds the x86
denormal-operand flag, which an SSE operation on a subnormal input such
as 0x1p-149 raises, so the check saw 0x2e where it expects 0x2c. glibc
and FreeBSD leave that flag out of FE_ALL_EXCEPT. The checks now read
the five C exception flags.
log1p returned the host's log1p, whose last bit differs from the titles'
copy on Windows on 24,477,433 of 320 million random arguments. The titles'
copy is FreeBSD msun's s_log1p.c, and it sets EDOM at msun's NaN return,
for arguments below -1, -inf and negative NaNs, but not for log1p(-1).
log1p now computes that algorithm and sets EDOM there.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add the long-double siblings of _Cosh and _Sinh with the same scaled finite-input path, signed-zero handling and Dinkumware two-argument contracts. The reductions use a long-double ln2 split, and the scaled-range tests pin 64-bit results instead of the intermediate writer's output. Cover known values, signs and non-finite inputs in guest_math; record the unverified console results and exception behavior in the libc debt list.
nextafter and nextafterf returned the host's functions. On Windows they
set ERANGE for a step from zero to the smallest subnormal, which the
titles' copies do not, and pick a different NaN when both arguments are
NaNs. The titles' copies are FreeBSD msun's s_nextafter.c and
s_nextafterf.c with ERANGE at msun's overflow and underflow returns; both
functions now compute that, choosing the NaN explicitly so the compiler
cannot reorder msun's x + y.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Additive conflicts with main's newer libc math changes: the debt list keeps
both sides' entries (per entry), the GuestMath.cpp test functions and calls
from both sides are kept, and Math.cpp keeps both sides' independent changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Additive conflicts with main's newer libc math changes: the debt list keeps
both sides' entries (per entry), the GuestMath.cpp test functions and calls
from both sides are kept, and Math.cpp keeps both sides' independent changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
expm1 returned the host's expm1, whose last bit differs from the titles'
copy on Windows on 35,152,346 of 320 million random arguments. The titles'
copy is FreeBSD msun's s_expm1.c, and it sets ERANGE only when a finite
argument overflows to infinity. expm1 now computes that algorithm and sets
ERANGE there.
Co-Authored-By: Claude Opus 5.5 <[email protected]>