Skip to content

Commit 201852d

Browse files
authored
bench: use uniform instead of randu
1 parent 7e1423a commit 201852d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/node_modules/@stdlib/stats/base/dists/geometric/mode/benchmark/benchmark.native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
2626
var tryRequire = require( '@stdlib/utils/try-require' );
27-
var randu = require( '@stdlib/random/base/randu' );
27+
var uniform = require( '@stdlib/random/base/uniform' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
29+
var EPS = require( '@stdlib/constants/float64/eps' );
2930
var pkg = require( './../package.json' ).name;
3031

3132

@@ -48,7 +49,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4849
len = 100;
4950
p = new Float64Array( len );
5051
for ( i = 0; i < len; i++ ) {
51-
p[ i ] = ( randu() * 1.0 );
52+
p[ i ] = uniform( EPS, 1.0 );
5253
}
5354

5455
b.tic();

0 commit comments

Comments
 (0)