Skip to content

Commit 32d2b77

Browse files
committed
docs: add missing API docs
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 0864071 commit 32d2b77

File tree

1 file changed

+20
-3
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/dnansumpw/src

1 file changed

+20
-3
lines changed

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

+20-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,33 @@
3232
*
3333
* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
3434
*
35-
* @param N number of indexed elements
36-
* @param X input array
35+
* @param N number of indexed elements
36+
* @param X input array
3737
* @param strideX stride length
38-
* @return output value
38+
* @return output value
3939
*/
4040
double API_SUFFIX(stdlib_strided_dnansumpw)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX ) {
4141
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
4242
return API_SUFFIX(stdlib_strided_dnansumpw_ndarray)( N, X, strideX, ox );
4343
}
4444

45+
/**
46+
* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation and alternative indexing semantics.
47+
*
48+
* ## Method
49+
*
50+
* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
51+
*
52+
* ## References
53+
*
54+
* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
55+
*
56+
* @param N number of indexed elements
57+
* @param X input array
58+
* @param strideX stride length
59+
* @param offsetX starting index
60+
* @return output value
61+
*/
4562
double API_SUFFIX(stdlib_strided_dnansumpw_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
4663
CBLAS_INT ix;
4764
CBLAS_INT M;

0 commit comments

Comments
 (0)