diff --git a/.gitignore b/.gitignore index 49b206b8b..4fdc97c09 100644 --- a/.gitignore +++ b/.gitignore @@ -101,6 +101,8 @@ docs/**/node_modules/ pids *.pid *.seed +yarn.lock +package-lock.json # Typescript # ############## diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d221143..398fa7241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-07-28) +## Unreleased (2024-07-29)
@@ -2669,6 +2669,7 @@ A total of 35 people contributed to this release. Thank you to the following con
+- [`308005e`](https://github.com/stdlib-js/stdlib/commit/308005e8a9cf48917f0c68451bd05f7d6fb06ba4) - **bench:** adjust sample values to prevent overflow _(by Athan Reines)_ - [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_ - [`f53097a`](https://github.com/stdlib-js/stdlib/commit/f53097a6061a65547260d261ea425f3c2039c6f5) - **docs:** update comments _(by Athan Reines)_ - [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_ diff --git a/base/cscal/benchmark/c/benchmark.length.c b/base/cscal/benchmark/c/benchmark.length.c index 3c8311bec..239d6f67c 100644 --- a/base/cscal/benchmark/c/benchmark.length.c +++ b/base/cscal/benchmark/c/benchmark.length.c @@ -102,10 +102,10 @@ static double benchmark( int iterations, int len ) { double t; int i; - ca = stdlib_complex64( rand_float()*5.0f, rand_float()*2.0f ); + ca = stdlib_complex64( 1.0f, 0.0f ); for ( i = 0; i < len*2; i += 2 ) { - cx[ i ] = ( rand_float()*10000.0f ) - 5000.0f; - cx[ i+1 ] = ( rand_float()*10000.0f ) - 5000.0f; + cx[ i ] = ( rand_float()*2.0f ) - 1.0f; + cx[ i+1 ] = ( rand_float()*2.0f ) - 1.0f; } t = tic(); for ( i = 0; i < iterations; i++ ) { diff --git a/base/cscal/src/cscal.c b/base/cscal/src/cscal.c index c708862d7..2dc84e61b 100644 --- a/base/cscal/src/cscal.c +++ b/base/cscal/src/cscal.c @@ -41,8 +41,8 @@ void API_SUFFIX(c_cscal)( const CBLAS_INT N, const stdlib_complex64_t ca, void * return; } for ( i = 0; i < N; i++, ip1 += is1 ) { - z = *( (stdlib_complex64_t *)ip1 ); - *( (stdlib_complex64_t *)ip1 ) = stdlib_base_complex64_mul( ca, z ); + z = *(stdlib_complex64_t *)ip1; + *(stdlib_complex64_t *)ip1 = stdlib_base_complex64_mul( ca, z ); } return; } diff --git a/base/zscal/benchmark/c/benchmark.length.c b/base/zscal/benchmark/c/benchmark.length.c index 49dbb0019..71d0a8857 100644 --- a/base/zscal/benchmark/c/benchmark.length.c +++ b/base/zscal/benchmark/c/benchmark.length.c @@ -102,10 +102,10 @@ static double benchmark( int iterations, int len ) { double t; int i; - za = stdlib_complex128( rand_double()*1.0, rand_double()*0.0 ); + za = stdlib_complex128( 1.0, 0.0 ); for ( i = 0; i < len*2; i+=2 ) { - zx[ i ] = ( rand_double()*10000.0 ) - 5000.0; - zx[ i+1 ] = ( rand_double()*10000.0 ) - 5000.0; + zx[ i ] = ( rand_double()*2.0 ) - 1.0; + zx[ i+1 ] = ( rand_double()*2.0 ) - 1.0; } t = tic(); for ( i = 0; i < iterations; i++ ) { diff --git a/base/zscal/src/zscal.c b/base/zscal/src/zscal.c index affa48c8c..1e76ed849 100644 --- a/base/zscal/src/zscal.c +++ b/base/zscal/src/zscal.c @@ -41,8 +41,8 @@ void API_SUFFIX(c_zscal)( const CBLAS_INT N, const stdlib_complex128_t za, void return; } for ( i = 0; i < N; i++, ip1 += is1 ) { - z = *( (stdlib_complex128_t *)ip1 ); - *( (stdlib_complex128_t *)ip1 ) = stdlib_base_complex128_mul( za, z ); + z = *(stdlib_complex128_t *)ip1; + *(stdlib_complex128_t *)ip1 = stdlib_base_complex128_mul( za, z ); } return; }