From 611ebe76bac41944fac82833ab1efa0fe64d0999 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 19 Nov 2024 05:11:56 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 4 +++- ext/base/dnanasum/test/test.dnanasum.js | 12 ++++++++++++ ext/base/dnanasum/test/test.dnanasum.native.js | 12 ++++++++++++ ext/base/dnanasum/test/test.ndarray.js | 12 ++++++++++++ ext/base/dnanasum/test/test.ndarray.native.js | 12 ++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c70ce18f..5676a8d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -432,7 +432,7 @@ A total of 3 issues were closed in this release: ### Contributors -A total of 6 people contributed to this release. Thank you to the following contributors: +A total of 7 people contributed to this release. Thank you to the following contributors: - Aman Bhansali - Athan Reines @@ -440,6 +440,7 @@ A total of 6 people contributed to this release. Thank you to the following cont - Muhammad Haris - Neeraj Pathak - Philipp Burckhardt +- Saurabh Singh @@ -451,6 +452,7 @@ A total of 6 people contributed to this release. Thank you to the following cont
+- [`7f76495`](https://github.com/stdlib-js/stdlib/commit/7f76495810ffc554f5c8ef36d2458f6dfd1c31f2) - **test:** add tests to `blas/ext/base/dnanasum` [(#3056)](https://github.com/stdlib-js/stdlib/pull/3056) _(by Saurabh Singh, Athan Reines, stdlib-bot)_ - [`14b8f08`](https://github.com/stdlib-js/stdlib/commit/14b8f08874e0a6fc2f7cc6f31d6876afb159c7e4) - **feat:** add C `ndarray` implementation for `blas/base/scnrm2` [(#3133)](https://github.com/stdlib-js/stdlib/pull/3133) _(by Aman Bhansali)_ - [`d05d7b3`](https://github.com/stdlib-js/stdlib/commit/d05d7b352455ff537847cd081aafd1fb77c67c3e) - **feat:** add C `ndarray` implementation for `blas/base/dznrm2` [(#3130)](https://github.com/stdlib-js/stdlib/pull/3130) _(by Aman Bhansali, Athan Reines)_ - [`22b7505`](https://github.com/stdlib-js/stdlib/commit/22b75056694840ce79b3493940e442672bab96c6) - **refactor:** update `offset` handling and function documentation for `blas/ext/base/dsnannsumors` [(#3129)](https://github.com/stdlib-js/stdlib/pull/3129) _(by Muhammad Haris, stdlib-bot)_ diff --git a/ext/base/dnanasum/test/test.dnanasum.js b/ext/base/dnanasum/test/test.dnanasum.js index 5037b5ff..2113497a 100644 --- a/ext/base/dnanasum/test/test.dnanasum.js +++ b/ext/base/dnanasum/test/test.dnanasum.js @@ -162,6 +162,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnanasum( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports view offsets', function test( t ) { var x0; var x1; diff --git a/ext/base/dnanasum/test/test.dnanasum.native.js b/ext/base/dnanasum/test/test.dnanasum.native.js index 27a97e90..c6b52408 100644 --- a/ext/base/dnanasum/test/test.dnanasum.native.js +++ b/ext/base/dnanasum/test/test.dnanasum.native.js @@ -253,6 +253,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnanasum( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports view offsets', opts, function test( t ) { var x0; var x1; diff --git a/ext/base/dnanasum/test/test.ndarray.js b/ext/base/dnanasum/test/test.ndarray.js index 201e2ae3..c4818148 100644 --- a/ext/base/dnanasum/test/test.ndarray.js +++ b/ext/base/dnanasum/test/test.ndarray.js @@ -162,6 +162,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnanasum( x.length, x, 0, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports an `offset` parameter', function test( t ) { var x; var v; diff --git a/ext/base/dnanasum/test/test.ndarray.native.js b/ext/base/dnanasum/test/test.ndarray.native.js index 6177740e..b722b6b1 100644 --- a/ext/base/dnanasum/test/test.ndarray.native.js +++ b/ext/base/dnanasum/test/test.ndarray.native.js @@ -171,6 +171,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnanasum( x.length, x, 0, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports an `offset` parameter', opts, function test( t ) { var x; var v;