Commit Graph
301 Commits
Author SHA1 Message Date
JJenkx 71ab8de49b Merge commit '0540ef0ef2ec2bfb98b2d105a969921611bd3d61' into HEAD 2026-11-04 21:21:02 -05:00
Dean 88bcfc7a7b Merge pull request #12366 from JJenkx/windows/libc-fdim-invalid
fix(libc): raise FE_INVALID from fdim and fdimf for equal infinities
2026-11-05 13:18:44 +13:00
JJenkxandClaude Opus 5.5 9cfddbd613 Merge main 9ab6a281ea into the hypotf branch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 13:27:22 -05:00
Dean ee42ed3c17 Merge pull request #10265 from JJenkx/windows/libc-pow-fdlibm
fix(libc): compute pow with fdlibm's algorithm, as titles' libc.prx does
2026-11-05 06:34:47 +13:00
JJenkx c5d31ec4d7 chore(libc): integrate current main regressions 2026-11-04 10:14:26 -05:00
Dean cecb4b205b Merge pull request #11632 from AlexFigas/fix/libc-cbrtl-msun-ld80
fix(libc): compute cbrtl with FreeBSD msun's ld80 code as the bundled libc.prx does
2026-11-04 17:49:26 +13:00
Dean eecbc4f185 Merge pull request #10349 from JJenkx/windows/libc-remainder-fprem1
fix(libc): compute remainder and remquo with fprem1, as titles' libc.prx does
2026-11-04 17:48:30 +13:00
Dean 19a34af158 Merge pull request #9873 from JJenkx/windows/libc-log10f-log2f-msun
fix(libc): compute log10f and log2f with FreeBSD msun 9.0's algorithms, as titles' libc.prx does
2026-11-04 16:58:47 +13:00
JJenkx 83dcad0259 chore(libc): integrate current main math regressions 2026-11-03 08:08:19 -05:00
JJenkx 3bf30fd492 chore(libc): integrate current main math regressions 2026-11-03 08:08:15 -05:00
JJenkxandClaude Opus 5.5 f1bd618376 Merge main into windows/libc-fdim-invalid
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 04:13:43 -05:00
JJenkxandClaude Opus 5.5 2c8a5d59f8 chore: merge main into the exp topic
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 18:24:28 -05:00
Alexandre Figueiredo b2a99b137f Merge upstream main into fix/libc-cbrtl-msun-ld80 2026-11-02 19:40:39 +00:00
JJenkxandClaude Opus 5.5 04983c615f fix(libc): compute hypotf with FreeBSD msun's algorithm, as titles' libc.prx does
hypotf rounded the host's double hypot to float, which differs from the
titles' copy on about one in sixteen random pairs. The titles' copy is
FreeBSD msun's e_hypotf.c, computed in float, which sets no errno even
on overflow; hypotf now computes that algorithm.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 12:52:55 -05:00
JJenkx 1c4650937d chore(libc): integrate current main math regressions 2026-11-02 12:46:25 -05:00
JJenkx 904fbdca7e chore(libc): integrate current main math regressions 2026-11-02 12:46:22 -05:00
Dean f133e5e326 Merge pull request #11892 from JJenkx/windows/libc-wcstod-subnormal-erange
fix(libc): set ERANGE for decimal subnormals in wcstod as strtod does
2026-11-03 01:28:05 +13:00
Dean Galvin 6ea7d0ee1c Merge commit '3c3b3cda739f9eb00a07fae50d94a3af5f6fb8f2' into HEAD
# Conflicts:
#	core/libs/prx/libc/src/Math.cpp
2026-11-02 23:35:08 +13:00
Dean 0f0452e319 Merge pull request #11077 from JJenkx/fix/libc-frexp-floating-environment
fix(libc): preserve frexp decomposition and exception behavior
2026-11-02 23:26:47 +13:00
Dean 5c3e446c0b Merge pull request #10317 from JJenkx/windows/libc-log2-fdlibm
fix(libc): compute log2 with fdlibm's algorithm, as titles' libc.prx does
2026-11-02 23:25:45 +13:00
Dean Galvin 56b4b3d020 Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
# Conflicts:
#	core/libs/prx/libc/src/Math.cpp
2026-11-02 21:17:24 +13:00
Dean Galvin d68b404d4a Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
# Conflicts:
#	core/libs/prx/libc/src/Math.cpp
#	core/libs/tests/GuestMath.cpp
#	docs/dev/debt/libc.md
2026-11-02 21:06:56 +13:00
Dean 67a7602c33 Merge pull request #10247 from JJenkx/windows/libc-log10-msun
fix(libc): compute log10 with fdlibm's algorithm, as titles' libc.prx does
2026-11-02 21:00:20 +13:00
Dean 2aee0b06f6 Merge pull request #10229 from JJenkx/windows/libc-atan-atan2-msun
fix(libc): compute atan and atan2 with FreeBSD msun's algorithm, as titles' libc.prx does
2026-11-02 21:00:13 +13:00
JJenkxandClaude Opus 5.5 3ae4cd1429 fix(libc): compute remainder and remquo with fprem1, as titles' libc.prx does
remainder, remainderf, remquo and remquof returned the host's functions.
The titles' copies are FreeBSD's amd64 e_remainder.S and s_remquo.S: an
x87 fprem1 loop whose remquo quotient is the sign and the three low bits
from C0, C3 and C1, and whose NaN results follow x87 NaN selection. Sony's
wrapper sets EDOM for a zero divisor or an infinite dividend when neither
argument is a NaN. All four now run that loop and set that errno.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 20:17:52 -05:00
Alexandre Figueiredo 5ab9b2926a Merge upstream main into fix/libc-cbrtl-msun-ld80 2026-11-01 20:16:42 +00:00
Qu Yi 4a65ddf97c chore(libc): synchronize nearbyint fix with main
Preserve the nearbyint implementation and regression coverage while incorporating current main. The write-watch registration prerequisite is now part of main.

Validation: freshly compiled production MathExact.cpp regression passes; ASan/UBSan passes with detect_leaks=0. The same fixture compiles against main Math.cpp and fails at the FE_INEXACT assertion (exit 134). Conventions, whitespace and 235 script registrations pass. Full product build and full CTest were not rerun for this synchronization.
2026-11-01 14:56:40 +08:00
Dean 88b7503129 Merge pull request #10222 from JJenkx/windows/libc-expm1f-msun
fix(libc): compute expm1f with FreeBSD msun's algorithm, as titles' libc.prx does
2026-11-01 14:57:48 +13:00
Alexandre Figueiredo 02c58684e5 Merge upstream main into fix/libc-cbrtl-msun-ld80 2026-11-01 00:16:16 +00:00
JJenkxandClaude Opus 5.5 af2d1f35e3 fix(libc): compute exp with FreeBSD msun's algorithm, as titles' libc.prx does
exp returned the host's exp, whose last bit differs from the titles' copy on
Windows on 9,892,285 of 320 million random arguments. The titles' copy is
FreeBSD msun's e_exp.c, except that exp(1) returns the correctly rounded e,
and it sets ERANGE only in msun's overflow and underflow branches. exp now
computes that and sets ERANGE there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 10:24:02 -04:00
Qu Yi 4c41442276 fix(libc): match nearbyint inexact flags to guest libc 2026-10-31 15:51:17 +08:00
Oscar45397andClaude Opus 5.5 66f151fd7d test(libc): cover remainderf
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 18:35:56 +01:00
JJenkx 250f5b51de fix(libc): integrate expm1f on refreshed tanhf parent 2026-10-30 07:33:46 -04:00
JJenkx a06ed844e3 fix(libc): integrate current main into tanhf port 2026-10-30 07:32:57 -04:00
Alexandre Figueiredo 554c60b29f Merge upstream main into fix/libc-cbrtl-msun-ld80 2026-10-30 08:39:26 +00:00
JJenkx edceab45c7 fix(libc): integrate current main and log10 parent into log2 2026-10-29 23:22:00 -04:00
JJenkx 8bb1886d3a fix(libc): integrate current main into PR 10229 2026-10-29 23:21:11 -04:00
JJenkx 476bb9f96c fix(libc): integrate current main into PR 10247 2026-10-29 23:20:34 -04:00
Adrià 18bf374028 Merge pull request #12178 from Henryisdjfunkyho/fix/libc-nearbyintf-current
fix(libc): raise inexact for nearbyintf
2026-10-30 02:00:49 +01:00
Adrià f0c8f26eec Merge pull request #12676 from JJenkx/windows/libc-ldexpf-errno
fix(libc): leave errno unchanged from ldexpf, as titles' libc.prx does
2026-10-30 00:18:56 +01:00
Adrià 2e55a9d0f6 Merge pull request #12681 from JJenkx/windows/libc-scalbn-errno
fix(libc): leave errno unchanged from scalbn and scalbnf on every host
2026-10-30 00:02:33 +01:00
Adnan Khan c118a61fdd fix(libc): keep clang's SLP vectorizer from raising spurious FP exceptions in libc 2026-10-29 21:00:41 +05:30
JJenkxandClaude Opus 5.5 f6ca8993e8 fix(libc): set ERANGE for decimal subnormals in wcstod as strtod does
wcstod parsed through the host strtod directly, so a decimal input with
a nonzero subnormal result left errno alone, where strtod sets ERANGE.
The wcstod of the libc.prx bundled with eleven titles sets it in the
same cases as their strtod: 1e-310, the smallest subnormal and 1e-330
set it, 2.2250738585072014e-308 and 0x1p-1074 do not, and 0x1.8p-1075
does. wcstod now parses through strtod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 08:49:40 -04:00
Dean 8efa579b15 Merge pull request #12361 from JJenkx/windows/libc-powf-underflow-flag
fix(libc): raise FE_UNDERFLOW from powf when the result underflows
2026-10-29 23:49:09 +13:00
Alexandre Figueiredo 3688e03a74 fix(libc): compute cbrtl with FreeBSD msun's ld80 code as the bundled libc.prx does 2026-10-29 10:24:05 +00:00
Dean 8a1e06ec98 Merge pull request #11203 from MarcZX10/marc/test-name-failing-math-checks
test(libc): name the failing check in the math tests
2026-10-29 18:48:33 +13:00
Henryisdjfunkyho 472500cb80 fix(libc): honor rounding modes in nearbyintf 2026-10-28 22:06:25 -07:00
Henryisdjfunkyho 3182d23266 fix(libc): raise inexact for nearbyintf 2026-10-28 22:06:24 -07:00
Dean 444407ddd6 Merge pull request #11278 from AlexFigas/fix/libc-signbit-sign-mask
fix(libc): return the sign mask from __signbit, __signbitf and __signbitl
2026-10-29 16:25:03 +13:00
JJenkxandClaude Opus 5.5 a561f4e591 fix(libc): leave errno unchanged from scalbn and scalbnf on every host
The titles' scalbn and scalbnf never set errno, at any exponent. On
Windows the host scalbn already matches, but glibc's scalbn and scalbnf
set ERANGE on overflow and on underflow to zero (found by rooklz while
reviewing #12676), so on Linux they did. Both now keep errno across the
host call, as scalbln and scalblnf already do. CheckScalbnErrno checks
results read from the titles' libc.prx.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 21:47:44 -04:00