diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.js index 6e3896602ca7..7698df291d3b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.js @@ -22,8 +22,8 @@ var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var uniform = require( '@stdlib/random/array/uniform' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniformArray = require( '@stdlib/random/array/uniform' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var cdf = require( './../lib' ); @@ -44,9 +44,9 @@ bench( pkg, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu() * 20.0 ) - 10.0; - min[ i ] = ( randu() * 20.0 ) - 20.0; - max[ i ] = min[ i ] + ( randu() * 40.0 ); + x[ i ] = uniform( -10.0, 10.0 ); + min[ i ] = uniform( -20.0, 0.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 40.0 ); } b.tic(); @@ -75,7 +75,7 @@ bench( pkg+':factory', function benchmark( b ) { min = -1.5; max = 1.5; mycdf = cdf.factory( min, max ); - x = uniform( 100, -2.0, 2.0 ); + x = uniformArray( 100, -2.0, 2.0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.native.js index b25c4c57877c..7e4532a721cb 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/benchmark/benchmark.native.js @@ -23,7 +23,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -52,9 +52,9 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu() * 20.0 ) - 10.0; - min[ i ] = ( randu() * 20.0 ) - 20.0; - max[ i ] = min[ i ] + ( randu() * 40.0 ); + x[ i ] = uniform( -10.0, 10.0 ); + min[ i ] = uniform( -20.0, 0.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 40.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/benchmark/benchmark.js index 7570a5702ded..a6805942e05c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/benchmark/benchmark.js @@ -22,6 +22,7 @@ var bench = require( '@stdlib/bench' ); var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -38,8 +39,8 @@ bench( pkg+'::instantiation', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - a = ( randu() * 10.0 ) + EPS; - b = ( randu() * 10.0 ) + a + EPS; + a = uniform( EPS, 10.0 ); + b = uniform( a + EPS, a + 10.0 + EPS ); dist = new Arcsine( a, b ); if ( !( dist instanceof Arcsine ) ) { bm.fail( 'should return a distribution instance' ); @@ -92,7 +93,7 @@ bench( pkg+'::set:a', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - y = ( 100.0*randu() ) + EPS; + y = uniform( EPS, 100.0 + EPS ); dist.a = y; if ( dist.a !== y ) { bm.fail( 'should return set value' ); @@ -145,7 +146,7 @@ bench( pkg+'::set:b', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - y = ( 100.0*randu() ) + a + EPS; + y = uniform( a + EPS, a + 100.0 + EPS ); dist.b = y; if ( dist.b !== y ) { bm.fail( 'should return set value' ); @@ -172,7 +173,7 @@ bench( pkg+':entropy', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.entropy; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -199,7 +200,7 @@ bench( pkg+':kurtosis', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.kurtosis; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -226,7 +227,7 @@ bench( pkg+':mean', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.mean; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -253,7 +254,7 @@ bench( pkg+':median', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.median; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -280,7 +281,7 @@ bench( pkg+':mode', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + 1.0 + EPS; + dist.a = uniform( 1.0 + EPS, 101.0 + EPS ); y = dist.mode; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -307,7 +308,7 @@ bench( pkg+':skewness', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.skewness; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -334,7 +335,7 @@ bench( pkg+':stdev', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.stdev; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); @@ -361,7 +362,7 @@ bench( pkg+':variance', function benchmark( bm ) { bm.tic(); for ( i = 0; i < bm.iterations; i++ ) { - dist.a = ( 100.0*randu() ) + EPS; + dist.a = uniform( EPS, 100.0 + EPS ); y = dist.variance; if ( isnan( y ) ) { bm.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.js index 3cc3cabd688c..6ff89647fa04 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.js @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var entropy = require( './../lib' ); @@ -41,8 +41,8 @@ bench( pkg, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 20.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 20.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.native.js index 85e0f6e0cb25..3d0052873c55 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/benchmark/benchmark.native.js @@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; @@ -50,8 +50,8 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 20.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 20.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js index 83c785aa5d25..b4566635424e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var kurtosis = require( './../lib' ); @@ -41,8 +41,8 @@ bench( pkg, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 20.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 20.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js index 194d36a24129..4b3d986776c3 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js @@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; @@ -50,8 +50,8 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 20.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 20.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logcdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logcdf/benchmark/benchmark.js index f8b8531dc0e9..2eebbecf1ff5 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logcdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logcdf/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var logcdf = require( './../lib' ); @@ -38,9 +38,9 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 20.0 ) - 10.0; - min = ( randu() * 20.0 ) - 20.0; - max = min + ( randu() * 40.0 ); + x = uniform( -10.0, 10.0 ); + min = uniform( -20.0, 0.0 ); + max = uniform( min, min + 40.0 ); y = logcdf( x, min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); @@ -68,7 +68,7 @@ bench( pkg+':factory', function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*2.0 ) - 2.0; + x = uniform( -2.0, 0.0 ); y = mylogcdf( x ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.js index 949dce94fed0..ee3deab4ce2f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var logpdf = require( './../lib' ); @@ -38,9 +38,9 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 20.0 ) - 10.0; - min = ( randu() * 20.0 ) - 20.0; - max = min + ( randu() * 40.0 ); + x = uniform( -10.0, 10.0 ); + min = uniform( -20.0, 0.0 ); + max = uniform( min, min + 40.0 ); y = logpdf( x, min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); @@ -68,7 +68,7 @@ bench( pkg+':factory', function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*2.0 ) - 2.0; + x = uniform( -2.0, 0.0 ); y = mylogpdf( x ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.native.js index 30ca6ca83112..53c1f36a7b19 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/logpdf/benchmark/benchmark.native.js @@ -23,7 +23,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -52,9 +52,9 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu() * 20.0 ) - 10.0; - min[ i ] = ( randu() * 20.0 ) - 20.0; - max[ i ] = min[ i ] + ( randu() * 40.0 ); + x[ i ] = uniform( -10.0, 10.0 ); + min[ i ] = uniform( -20.0, 0.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 40.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/mean/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/mean/benchmark/benchmark.js index 4b5fbad67902..509aa66684ce 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/mean/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/mean/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var mean = require( './../lib' ); @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; + min = uniform( 0.0, 10.0 ); + max = uniform( min, min + 10.0 ); y = mean( min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/median/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/median/benchmark/benchmark.js index fe0c91f29a36..5d43dfb91ecf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/median/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/median/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var median = require( './../lib' ); @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; + min = uniform( 0.0, 10.0 ); + max = uniform( min, min + 10.0 ); y = median( min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/mode/benchmark/benchmark.js index 8a3d5a7733d1..5b77e4a2e3c1 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/mode/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/mode/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var mode = require( './../lib' ); @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; + min = uniform( 0.0, 10.0 ); + max = uniform( min, min + 10.0 ); y = mode( min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.js index d7c0efeb2f9d..185143d3037f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var pdf = require( './../lib' ); @@ -38,9 +38,9 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 20.0 ) - 10.0; - min = ( randu() * 20.0 ) - 20.0; - max = min + ( randu() * 40.0 ); + x = uniform( -10.0, 10.0 ); + min = uniform( -20.0, 0.0 ); + max = uniform( min, min + 40.0 ); y = pdf( x, min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); @@ -68,7 +68,7 @@ bench( pkg+':factory', function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*2.0 ) - 2.0; + x = uniform( -2.0, 0.0 ); y = mypdf( x ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.native.js index 2bd2df14d18f..b8b4b3ff3152 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/pdf/benchmark/benchmark.native.js @@ -23,7 +23,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -52,9 +52,9 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu() * 20.0 ) - 10.0; - min[ i ] = ( randu() * 20.0 ) - 20.0; - max[ i ] = min[ i ] + ( randu() * 40.0 ); + x[ i ] = uniform( -10.0, 10.0 ); + min[ i ] = uniform( -20.0, 0.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 40.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/benchmark/benchmark.js index b88f69fd2e63..f7fb6e26a530 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/benchmark/benchmark.js @@ -22,6 +22,7 @@ var bench = require( '@stdlib/bench' ); var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var quantile = require( './../lib' ); @@ -39,8 +40,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { p = randu(); - min = ( randu() * 20.0 ) - 20.0; - max = min + ( randu() * 40.0 ); + min = uniform( -20.0, 0.0 ); + max = uniform( min, min + 40.0 ); y = quantile( p, min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/skewness/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/skewness/benchmark/benchmark.js index 58aef356eebe..57e6b9bf798f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/skewness/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/skewness/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var skewness = require( './../lib' ); @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; + min = uniform( 0.0, 10.0 ); + max = uniform( min, min + 10.0 ); y = skewness( min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/stdev/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/stdev/benchmark/benchmark.js index 595f68a56f57..b350f6b216da 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/stdev/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/stdev/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var stdev = require( './../lib' ); @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; + min = uniform( 0.0, 10.0 ); + max = uniform( min, min + 10.0 ); y = stdev( min, max ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.js index a822b9084a07..bee3bb83b132 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.js @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var variance = require( './../lib' ); @@ -41,8 +41,8 @@ bench( pkg, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = ( randu() * 10.0 ); - max[ i ] = ( randu() * 10.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 10.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 10.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.native.js index d427c38060a3..ea895ca8e9fa 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/benchmark.native.js @@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var tryRequire = require( '@stdlib/utils/try-require' ); var Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; @@ -50,8 +50,8 @@ bench( pkg+'::native', opts, function benchmark( b ) { min = new Float64Array( len ); max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - min[ i ] = ( randu() * 10.0 ); - max[ i ] = ( randu() * 10.0 ) + min[ i ]; + min[ i ] = uniform( 0.0, 10.0 ); + max[ i ] = uniform( min[ i ], min[ i ] + 10.0 ); } b.tic();