Skip to content

Commit dfc839b

Browse files
committed
bench: ensure we do not generate NaNs
--- 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: 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 746c8bf commit dfc839b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/node_modules/@stdlib/stats/base/dists/logistic/mgf/benchmark/benchmark.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ bench( pkg, function benchmark( b ) {
4444
mu = new Float64Array( len );
4545
s = new Float64Array( len );
4646
for ( i = 0; i < len; i++ ) {
47-
s[ i ] = uniform( EPS, 5.0 );
48-
t[ i ] = uniform( 0.0, 1.0 );
49-
mu[ i ] = uniform( -10.0, 10.0 );
47+
t[ i ] = uniform( 0.0, 0.5 );
48+
mu[ i ] = uniform( -5.0, 5.0 );
49+
s[ i ] = uniform( EPS, 2.0 );
5050
}
5151

5252
b.tic();
@@ -74,12 +74,12 @@ bench( pkg+':factory', function benchmark( b ) {
7474
var i;
7575

7676
mu = 10.0;
77-
s = 4.0;
77+
s = 0.5;
7878
mymgf = mgf.factory( mu, s );
7979
len = 100;
8080
t = new Float64Array( len );
8181
for ( i = 0; i < len; i++ ) {
82-
t[ i ] = uniform( 0.0, 1.0 );
82+
t[ i ] = uniform( 0.0, 0.5 );
8383
}
8484

8585
b.tic();

lib/node_modules/@stdlib/stats/base/dists/logistic/mgf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bench( pkg, opts, function benchmark( b ) {
5353
mu = new Float64Array( len );
5454
s = new Float64Array( len );
5555
for ( i = 0; i < len; i++ ) {
56-
t[ i ] = uniform( 0.0, 1.0 );
56+
t[ i ] = uniform( 0.0, 0.5 );
5757
mu[ i ] = uniform( -5.0, 5.0 );
5858
s[ i ] = uniform( EPS, 5.0 );
5959
}

0 commit comments

Comments
 (0)