Skip to content

Commit 5ae1285

Browse files
committed
fix: address precision regression and fix benchmark dtypes
--- 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: passed - 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: passed - 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 0b2e23d commit 5ae1285

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/stats/base/smidrange/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var smidrange = require( './../lib/smidrange.js' );
3131
// VARIABLES //
3232

3333
var options = {
34-
'dtype': 'float64'
34+
'dtype': 'float32'
3535
};
3636

3737

lib/node_modules/@stdlib/stats/base/smidrange/benchmark/benchmark.ndarray.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var opts = {
3636
'skip': ( smidrange instanceof Error )
3737
};
3838
var options = {
39-
'dtype': 'float64'
39+
'dtype': 'float32'
4040
};
4141

4242

lib/node_modules/@stdlib/stats/base/smidrange/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ float API_SUFFIX(stdlib_strided_smidrange)( const CBLAS_INT N, const float *X, c
3737
}
3838

3939
/**
40-
* Computes the mid-range of a single-precision floating-point strided array and using alternative indexing semantics.
40+
* Computes the mid-range of a single-precision floating-point strided array using alternative indexing semantics.
4141
*
4242
* @param N number of indexed elements
4343
* @param X input array
@@ -53,7 +53,7 @@ float API_SUFFIX(stdlib_strided_smidrange_ndarray)( const CBLAS_INT N, const flo
5353
float v;
5454

5555
if ( N <= 0 ) {
56-
return 0.0 / 0.0; // NaN
56+
return 0.0f / 0.0f; // NaN
5757
}
5858
if ( N == 1 || strideX == 0 ) {
5959
return X[ offsetX ];
@@ -73,5 +73,5 @@ float API_SUFFIX(stdlib_strided_smidrange_ndarray)( const CBLAS_INT N, const flo
7373
max = v;
7474
}
7575
}
76-
return ( max+min ) / 2.0;
76+
return ( max+min ) / 2.0f;
7777
}

0 commit comments

Comments
 (0)