Skip to content

Commit

Permalink
fix: address precision regression and fix benchmark dtypes
Browse files Browse the repository at this point in the history
---
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
---
  • Loading branch information
kgryte committed Jan 11, 2025
1 parent 0b2e23d commit 5ae1285
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var smidrange = require( './../lib/smidrange.js' );
// VARIABLES //

var options = {
'dtype': 'float64'
'dtype': 'float32'
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var opts = {
'skip': ( smidrange instanceof Error )
};
var options = {
'dtype': 'float64'
'dtype': 'float32'
};


Expand Down
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/stats/base/smidrange/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ float API_SUFFIX(stdlib_strided_smidrange)( const CBLAS_INT N, const float *X, c
}

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

if ( N <= 0 ) {
return 0.0 / 0.0; // NaN
return 0.0f / 0.0f; // NaN
}
if ( N == 1 || strideX == 0 ) {
return X[ offsetX ];
Expand All @@ -73,5 +73,5 @@ float API_SUFFIX(stdlib_strided_smidrange_ndarray)( const CBLAS_INT N, const flo
max = v;
}
}
return ( max+min ) / 2.0;
return ( max+min ) / 2.0f;
}

1 comment on commit 5ae1285

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
stats/base/dmidrange $\color{green}375/375$
$\color{green}+100.00\%$
$\color{green}29/29$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}375/375$
$\color{green}+100.00\%$
stats/base/smidrange $\color{green}375/375$
$\color{green}+100.00\%$
$\color{green}29/29$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}375/375$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.