Skip to content

Commit 7d2cd55

Browse files
committed
fix: add missing benchmark dependency and fix callback naming
- Add missing `@stdlib/constants/float64/eps` to benchmark task dependencies in manifest.json (the C benchmark uses it) - Rename benchmark callback parameter from `b` to `assert` to avoid shadowing the shape-parameter variable `b`, matching the convention used in sibling packages Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 66ab0e8 commit 7d2cd55

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎lib/node_modules/@stdlib/math/base/special/betaincinv/benchmark/benchmark.native.js‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,28 @@ var opts = {
4040

4141
// MAIN //
4242

43-
bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
43+
bench( format( '%s::native', pkg ), opts, function benchmark( assert ) {
4444
var x;
4545
var a;
46-
var v;
46+
var b;
4747
var y;
4848
var i;
4949

5050
x = uniform( 100, 0.0, 1.0 );
5151
a = uniform( 100, EPS, 1000.0 );
52-
v = uniform( 100, EPS, 1000.0 );
52+
b = uniform( 100, EPS, 1000.0 );
5353

54-
b.tic();
55-
for ( i = 0; i < b.iterations; i++ ) {
56-
y = betaincinv( x[ i%x.length ], a[ i%a.length ], v[ i%v.length ] );
54+
assert.tic();
55+
for ( i = 0; i < assert.iterations; i++ ) {
56+
y = betaincinv( x[ i%x.length ], a[ i%a.length ], b[ i%b.length ] );
5757
if ( isnan( y ) ) {
58-
b.fail( 'should not return NaN' );
58+
assert.fail( 'should not return NaN' );
5959
}
6060
}
61-
b.toc();
61+
assert.toc();
6262
if ( isnan( y ) ) {
63-
b.fail( 'should not return NaN' );
63+
assert.fail( 'should not return NaN' );
6464
}
65-
b.pass( 'benchmark finished' );
66-
b.end();
65+
assert.pass( 'benchmark finished' );
66+
assert.end();
6767
});

‎lib/node_modules/@stdlib/math/base/special/betaincinv/manifest.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"libraries": [],
5757
"libpath": [],
5858
"dependencies": [
59+
"@stdlib/constants/float64/eps",
5960
"@stdlib/math/base/assert/is-nan",
6061
"@stdlib/math/base/special/kernel-betaincinv"
6162
]

0 commit comments

Comments
 (0)