diff --git a/CHANGELOG.md b/CHANGELOG.md index ce888480d..e60f2255f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-07-11) +## Unreleased (2024-07-14)
@@ -2503,6 +2503,7 @@ A total of 35 people contributed to this release. Thank you to the following con
+- [`562f806`](https://github.com/stdlib-js/stdlib/commit/562f80662e928af49eac8dd78ee57b1785aab515) - **style:** group expressions based on order of operations _(by Athan Reines)_ - [`a78f42b`](https://github.com/stdlib-js/stdlib/commit/a78f42b3295fe4513a15b90a837b60a63fc1f6bc) - **docs:** fix paths in examples and refactor array creation in benchmarks [(#2563)](https://github.com/stdlib-js/stdlib/pull/2563) _(by Aman Bhansali)_ - [`4d5293d`](https://github.com/stdlib-js/stdlib/commit/4d5293d0cfd81bd1016d1bcc372afefe20b1a211) - **feat:** add `blas/base/zdrot` [(#2257)](https://github.com/stdlib-js/stdlib/pull/2257) _(by Aman Bhansali, Athan Reines)_ - [`f35cb6e`](https://github.com/stdlib-js/stdlib/commit/f35cb6eb2dddc6fdcc904ef165b92970f4a50698) - **docs:** fix description _(by Athan Reines)_ diff --git a/base/zdrot/src/zdrot.c b/base/zdrot/src/zdrot.c index e4b751d2d..63ed53420 100644 --- a/base/zdrot/src/zdrot.c +++ b/base/zdrot/src/zdrot.c @@ -47,13 +47,13 @@ void API_SUFFIX(c_zdrot)( const CBLAS_INT N, void *ZX, const CBLAS_INT strideX, } if ( strideX == 1 && strideY == 1 ) { for ( i = 0; i < N*2; i += 2 ) { - tmp = c*zx[ i ] + s*zy[ i ]; - zy[ i ] = c*zy[ i ] - s*zx[ i ]; + tmp = ( c*zx[ i ] ) + ( s*zy[ i ] ); + zy[ i ] = ( c*zy[ i ] ) - ( s*zx[ i ] ); zx[ i ] = tmp; j = i + 1; - tmp = c*zx[ j ] + s*zy[ j ]; - zy[ j ] = c*zy[ j ] - s*zx[ j ]; + tmp = ( c*zx[ j ] ) + ( s*zy[ j ] ); + zy[ j ] = ( c*zy[ j ] ) - ( s*zx[ j ] ); zx[ j ] = tmp; } return; @@ -63,12 +63,12 @@ void API_SUFFIX(c_zdrot)( const CBLAS_INT N, void *ZX, const CBLAS_INT strideX, ix = stdlib_strided_stride2offset( N, strideX ); iy = stdlib_strided_stride2offset( N, strideY ); for ( i = 0; i < N; i++ ) { - tmp = c*zx[ ix ] + s*zy[ iy ]; - zy[ iy ] = c*zy[ iy ] - s*zx[ ix ]; + tmp = ( c*zx[ ix ] ) + ( s*zy[ iy ] ); + zy[ iy ] = ( c*zy[ iy ] ) - ( s*zx[ ix ] ); zx[ ix ] = tmp; - tmp = c*zx[ ix+1 ] + s*zy[ iy+1 ]; - zy[ iy+1 ] = c*zy[ iy+1 ] - s*zx[ ix+1 ]; + tmp = ( c*zx[ ix+1 ] ) + ( s*zy[ iy+1 ] ); + zy[ iy+1 ] = ( c*zy[ iy+1 ] ) - ( s*zx[ ix+1 ] ); zx[ ix+1 ] = tmp; ix += sx; diff --git a/base/zdrot/src/zdrot.f b/base/zdrot/src/zdrot.f index 2ba8f1a40..28bf58412 100644 --- a/base/zdrot/src/zdrot.f +++ b/base/zdrot/src/zdrot.f @@ -69,8 +69,8 @@ subroutine zdrot( N, zx, strideX, zy, strideY, c, s ) ! .. if ( strideX == 1 .AND. strideY == 1 ) then do i = 1, N - ztmp = c*zx( i ) + s*zy( i ) - zy( i ) = c*zy( i ) - s*zx( i ) + ztmp = ( c*zx( i ) ) + ( s*zy( i ) ) + zy( i ) = ( c*zy( i ) ) - ( s*zx( i ) ) zx( i ) = ztmp end do else @@ -85,8 +85,8 @@ subroutine zdrot( N, zx, strideX, zy, strideY, c, s ) iy = 1 end if do i = 1, N - ztmp = c*zx( ix ) + s*zy( iy ) - zy( iy ) = c*zy( iy ) - s*zx( ix ) + ztmp = ( c*zx( ix ) ) + ( s*zy( iy ) ) + zy( iy ) = ( c*zy( iy ) ) - ( s*zx( ix ) ) zx( ix ) = ztmp ix = ix + strideX iy = iy + strideY