Skip to content

Commit bd83a17

Browse files
committed
Update benchmarks
1 parent 1840559 commit bd83a17

File tree

1 file changed

+27
-1
lines changed
  • lib/node_modules/@stdlib/random/base/logistic/benchmark

1 file changed

+27
-1
lines changed

lib/node_modules/@stdlib/random/base/logistic/benchmark/benchmark.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bench( pkg, function benchmark( b ) {
5353
b.end();
5454
});
5555

56-
bench( pkg+':factory', function benchmark( b ) {
56+
bench( pkg+'::factory', function benchmark( b ) {
5757
var rand;
5858
var mu;
5959
var s;
@@ -78,3 +78,29 @@ bench( pkg+':factory', function benchmark( b ) {
7878
b.pass( 'benchmark finished' );
7979
b.end();
8080
});
81+
82+
bench( pkg+'::factory,arguments', function benchmark( b ) {
83+
var rand;
84+
var mu;
85+
var s;
86+
var z;
87+
var i;
88+
89+
mu = 0.0;
90+
s = 1.5;
91+
rand = logistic.factory();
92+
93+
b.tic();
94+
for ( i = 0; i < b.iterations; i++ ) {
95+
z = rand( mu, s );
96+
if ( isnan( z ) ) {
97+
b.fail( 'should not return NaN' );
98+
}
99+
}
100+
b.toc();
101+
if ( isnan( z ) ) {
102+
b.fail( 'should not return NaN' );
103+
}
104+
b.pass( 'benchmark finished' );
105+
b.end();
106+
});

0 commit comments

Comments
 (0)