Skip to content

Commit 25ae71a

Browse files
committed
fix: remove use of abs to calculate sum
1 parent 40fe636 commit 25ae71a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/lib/ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
8080
out[ io+strideOut ] = 0;
8181
return out;
8282
}
83-
out[ io ] = abs( x[ ix ] ) * N;
83+
out[ io ] = x[ ix ] * N;
8484
out[ io+strideOut ] = N;
8585
return out;
8686
}

lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ double API_SUFFIX(stdlib_strided_dnannsumkbn_ndarray)( const CBLAS_INT N, const
8080
if ( stdlib_base_is_nan( X[ ix ] ) ) {
8181
return sum;
8282
}
83-
sum = stdlib_base_abs( X[ ix ] ) * N;
83+
sum = X[ ix ] * N;
8484
*n += N;
8585
return sum;
8686
}

0 commit comments

Comments
 (0)