Skip to content

Commit

Permalink
fix: apply code review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
headlessNode committed Oct 11, 2024
1 parent c657965 commit 6722038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ function dnansumkbn2( N, x, strideX, offsetX ) {
var i;

sum = 0.0;
ccs = 0.0; // second order correction term for lost low order bits
cs = 0.0; // first order correction term for lost low order bits
if ( N <= 0 ) {
return 0.0;
}
Expand All @@ -76,6 +74,8 @@ function dnansumkbn2( N, x, strideX, offsetX ) {
sum = x[ ix ] * N;
return sum;
}
ccs = 0.0; // second order correction term for lost low order bits
cs = 0.0; // first order correction term for lost low order bits
for ( i = 0; i < N; i++ ) {
v = x[ ix ];
if ( isnan( v ) === false ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ double API_SUFFIX(stdlib_strided_dnansumkbn2_ndarray)( const CBLAS_INT N, const
double c;

sum = 0.0;
ccs = 0.0; // second order correction term for lost lower order bits
cs = 0.0; // first order correction term for lost low order bits
if ( N <= 0 ) {
return sum;
}
Expand All @@ -85,6 +83,8 @@ double API_SUFFIX(stdlib_strided_dnansumkbn2_ndarray)( const CBLAS_INT N, const
sum = X[ ix ] * N;
return sum;
}
ccs = 0.0; // second order correction term for lost lower order bits
cs = 0.0; // first order correction term for lost low order bits
for ( i = 0; i < N; i++ ) {
v = X[ ix ];
if ( !stdlib_base_is_nan( v ) ) {
Expand Down

0 comments on commit 6722038

Please sign in to comment.