From 461873c559e5ceefc9ac102c75dc2c1f3640d2ab Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 12:29:10 +0000 Subject: [PATCH 1/5] fix: restore native test tolerances in `stats/base/dists/cauchy/cdf` The migration to ULP-based assertions copied the ULP bounds derived from the JavaScript test suite (32/128) into `test.native.js`, whose original tolerances were deliberately looser (750 eps and 8200 eps) and documented a fixture case for which the native implementation differs from the expected value by approximately 13764 ULPs. This restores equivalent bounds and the explanatory note. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01NJCXZyRqsVkbrugTvVu7LY --- .../stats/base/dists/cauchy/cdf/test/test.native.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js index b283b4175ffc..8960c502839c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js @@ -134,7 +134,7 @@ tape( 'the function evaluates the cdf for `x` given `x0` and `gamma` (`x0 < 0`)' gamma = negativeMedian.gamma; for ( i = 0; i < x.length; i++ ) { y = cdf( x[i], x0[i], gamma[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 32 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 1500 ), true, 'returns expected value' ); } t.end(); }); @@ -151,9 +151,16 @@ tape( 'the function evaluates the cdf for `x` given `x0` and `gamma` (`x0 > 0`)' x = positiveMedian.x; x0 = positiveMedian.x0; gamma = positiveMedian.gamma; + + /* + * NOTE: the ULP bound is set high in this case to accommodate a single test case (x: -157.97952978936485, x0: 11.935806197690301, gamma: 0.006888823412234402), for which + * - the expected value is 0.00001290513644541802 + * - but the function returns 0.000012905136445441337 + * which is a difference of approximately 13764 ULPs. + */ for ( i = 0; i < x.length; i++ ) { y = cdf( x[i], x0[i], gamma[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 128 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 14000 ), true, 'returns expected value' ); } t.end(); }); From 031bb4e719f69b63e7a46539325d72c8cbb018a5 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 12:29:17 +0000 Subject: [PATCH 2/5] fix: restore native test tolerance in `stats/base/dists/lognormal/mode` The migration to ULP-based assertions replaced the native test's deliberately looser tolerance of 18 eps with an exact-equality assertion (0 ULPs) copied from the JavaScript test suite, whose original tolerance was only 1 eps. This restores an equivalent bound of 36 ULPs. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01NJCXZyRqsVkbrugTvVu7LY --- .../@stdlib/stats/base/dists/lognormal/mode/test/test.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js index f3f7a13053f7..3d2d314d7b6f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js @@ -98,7 +98,7 @@ tape( 'the function returns the mode of a lognormal distribution', opts, functio for ( i = 0; i < mu.length; i++ ) { y = mode( mu[i], sigma[i] ); if ( expected[i] !== null ) { - t.strictEqual( isAlmostSameValue( y, expected[ i ], 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 36 ), true, 'returns expected value' ); } } t.end(); From ed56af9f91d189b906b8a8a8bfb686d706fda05c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 12:29:18 +0000 Subject: [PATCH 3/5] docs: fix overload description in `ndarray/ones-like` The `Float16Options` overload's description was copied from the `float32` overload and read "single-precision" instead of "half-precision". Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01NJCXZyRqsVkbrugTvVu7LY --- .../@stdlib/ndarray/ones-like/docs/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/ones-like/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/ones-like/docs/types/index.d.ts index 677be60c598d..a824aa8f134a 100644 --- a/lib/node_modules/@stdlib/ndarray/ones-like/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/ones-like/docs/types/index.d.ts @@ -422,7 +422,7 @@ declare function onesLike( x: ndarray, options: Float64Options ): float64ndarray declare function onesLike( x: ndarray, options: Float32Options ): float32ndarray; /** -* Creates a ones-filled single-precision floating-point array having the same shape as a provided input ndarray. +* Creates a ones-filled half-precision floating-point array having the same shape as a provided input ndarray. * * @param x - input array * @param options - options From a907bd3ca39082e2bed5d7c2158f5a38ae193e93 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 06:02:03 +0000 Subject: [PATCH 4/5] Revert "fix: restore native test tolerance in `stats/base/dists/lognormal/mode`" This reverts commit 031bb4e719f69b63e7a46539325d72c8cbb018a5. The premise was incorrect: PR CI compiles the native add-ons and runs the native test suites, so the migrated 0 ULP bound was validated against actual native output and the looser bound is unnecessary. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01NJCXZyRqsVkbrugTvVu7LY --- .../@stdlib/stats/base/dists/lognormal/mode/test/test.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js index 3d2d314d7b6f..f3f7a13053f7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js @@ -98,7 +98,7 @@ tape( 'the function returns the mode of a lognormal distribution', opts, functio for ( i = 0; i < mu.length; i++ ) { y = mode( mu[i], sigma[i] ); if ( expected[i] !== null ) { - t.strictEqual( isAlmostSameValue( y, expected[ i ], 36 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 0 ), true, 'returns expected value' ); } } t.end(); From de061f1585b74bac0b5862298f4f39ee97f089a8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 06:02:04 +0000 Subject: [PATCH 5/5] Revert "fix: restore native test tolerances in `stats/base/dists/cauchy/cdf`" This reverts commit 461873c559e5ceefc9ac102c75dc2c1f3640d2ab. The premise was incorrect: PR CI compiles the native add-ons and runs the native test suites, so the migrated 32/128 ULP bounds were validated against actual native output and the documented outlier in the removed note no longer reflects current native behavior. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01NJCXZyRqsVkbrugTvVu7LY --- .../stats/base/dists/cauchy/cdf/test/test.native.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js index 8960c502839c..b283b4175ffc 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/cauchy/cdf/test/test.native.js @@ -134,7 +134,7 @@ tape( 'the function evaluates the cdf for `x` given `x0` and `gamma` (`x0 < 0`)' gamma = negativeMedian.gamma; for ( i = 0; i < x.length; i++ ) { y = cdf( x[i], x0[i], gamma[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1500 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 32 ), true, 'returns expected value' ); } t.end(); }); @@ -151,16 +151,9 @@ tape( 'the function evaluates the cdf for `x` given `x0` and `gamma` (`x0 > 0`)' x = positiveMedian.x; x0 = positiveMedian.x0; gamma = positiveMedian.gamma; - - /* - * NOTE: the ULP bound is set high in this case to accommodate a single test case (x: -157.97952978936485, x0: 11.935806197690301, gamma: 0.006888823412234402), for which - * - the expected value is 0.00001290513644541802 - * - but the function returns 0.000012905136445441337 - * which is a difference of approximately 13764 ULPs. - */ for ( i = 0; i < x.length; i++ ) { y = cdf( x[i], x0[i], gamma[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 14000 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( y, expected[ i ], 128 ), true, 'returns expected value' ); } t.end(); });