diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/median/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/beta/median/benchmark/benchmark.js index 9bf45be93476..2ac82c96a46f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/median/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/median/benchmark/benchmark.js @@ -21,8 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var Float64Array = require( '@stdlib/array/float64' ); -var uniform = require( '@stdlib/random/base/uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -34,21 +33,19 @@ var median = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var y; var i; - len = 100; - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - alpha[ i ] = uniform( EPS, 10.0 ); - beta[ i ] = uniform( EPS, 10.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, EPS, 10.0, opts ); + beta = uniform( 100, EPS, 10.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = median( alpha[ i % len ], beta[ i % len ] ); + y = median( alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/median/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/beta/median/test/test.js index 58b4ff8cdf9c..0b7aa88eef95 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/median/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/median/test/test.js @@ -44,10 +44,10 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var v = median( NaN, 0.5 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = median( 10.0, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -56,19 +56,19 @@ tape( 'if provided `alpha <= 0`, the function returns `NaN`', function test( t ) var y; y = median( -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -77,19 +77,19 @@ tape( 'if provided `beta <= 0`, the function returns `NaN`', function test( t ) var y; y = median( 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( 1.0, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = median( NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/benchmark/benchmark.js index 6e4515310296..9bc21c22ea42 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/benchmark/benchmark.js @@ -21,8 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var Float64Array = require( '@stdlib/array/float64' ); -var uniform = require( '@stdlib/random/base/uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -34,24 +33,21 @@ var mgf = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var t; var y; var i; - len = 100; - t = new Float64Array( len ); - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - t[ i ] = uniform( 0.0, 20.0 ); - alpha[ i ] = uniform( EPS, 100.0 ); - beta[ i ] = uniform( EPS, 100.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, EPS, 100.0, opts ); + beta = uniform( 100, EPS, 100.0, opts ); + t = uniform( 100, 0.0, 20.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mgf( t[ i % len ], alpha[ i % len ], beta[ i % len ] ); + y = mgf( t[ i % t.length ], alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -68,23 +64,23 @@ bench( pkg+':factory', function benchmark( b ) { var mymgf; var alpha; var beta; - var len; + var opts; var t; var y; var i; + opts = { + 'dtype': 'float64' + }; + t = uniform( 100, 0.0, 20.0, opts ); + alpha = 100.56789; beta = 55.54321; mymgf = mgf.factory( alpha, beta ); - len = 100; - t = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - t[ i ] = uniform( 0.0, 20.0 ); - } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mymgf( t[ i % len ] ); + y = mymgf( t[ i % t.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.factory.js index 18e8cdfeb4d0..8026e2825ccd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.factory.js @@ -49,23 +49,23 @@ tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', mgf = factory( 1.0, 1.0 ); y = mgf( NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NaN, 1.0 ); y = mgf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( 1.0, NaN ); y = mgf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NaN, NaN ); y = mgf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NaN, NaN ); y = mgf( NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -77,31 +77,31 @@ tape( 'if provided a nonpositive `beta`, the created function always returns `Na mgf = factory( 1.0, 0.0 ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( 1.0, -1.0 ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( 1.0, NINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( PINF, NINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NINF, NINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NaN, NINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -113,31 +113,31 @@ tape( 'if provided a nonpositive `alpha`, the created function always returns `N mgf = factory( 0.0, 0.5 ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( -1.0, 0.5 ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NINF, 1.0 ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NINF, PINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NINF, NINF ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); mgf = factory( NINF, NaN ); y = mgf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -153,7 +153,7 @@ tape( 'the created function evaluates the mgf', function test( t ) { for ( i = 0; i < 100; i++ ) { x = randu(); y = mgf( x ); - t.strictEqual( !isnan( y ) && isNumber( y ), true, 'returns a number' ); + t.strictEqual( !isnan( y ) && isNumber( y ), true, 'returns expected value' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.mgf.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.mgf.js index 25b1464dc9bb..80681b1b53cb 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.mgf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mgf/test/test.mgf.js @@ -40,11 +40,11 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var y = mgf( NaN, 0.0, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0, NaN, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0, 1.0, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -52,25 +52,25 @@ tape( 'if provided a nonpositive `alpha`, the function returns `NaN`', function var y; y = mgf( 2.0, 0.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -79,25 +79,25 @@ tape( 'if provided a nonpositive `beta`, the function returns `NaN`', function t var y; y = mgf( 2.0, 2.0, 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 0.0, 2.0, -1/0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, 1.0, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mgf( 2.0, NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.js index d93871ef46e1..596e588d2cf8 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.js @@ -21,8 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var uniform = require( '@stdlib/random/base/uniform' ); -var Float64Array = require( '@stdlib/array/float64' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -34,21 +33,19 @@ var mode = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var y; var i; - len = 100; - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - alpha[ i ] = uniform( 1.0 + EPS, 10.0 ); - beta[ i ] = uniform( 1.0 + EPS, 10.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, 1.0 + EPS, 10.0, opts ); + beta = uniform( 100, 1.0 + EPS, 10.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mode( alpha[ i % len ], beta[ i % len ] ); + y = mode( alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.native.js index a8fd91f24081..ea22c7d966aa 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/benchmark/benchmark.native.js @@ -22,9 +22,8 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var Float64Array = require( '@stdlib/array/float64' ); var EPS = require( '@stdlib/constants/float64/eps' ); -var uniform = require( '@stdlib/random/base/uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -43,21 +42,19 @@ var opts = { bench( pkg+'::native', opts, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var y; var i; - len = 100; - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - alpha[ i ] = uniform( 1.0 + EPS, 10.0 ); - beta[ i ] = uniform( 1.0 + EPS, 10.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, 1.0 + EPS, 10.0, opts ); + beta = uniform( 100, 1.0 + EPS, 10.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mode( alpha[ i % len ], beta[ i % len ] ); + y = mode( alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.js index 97fb516589ae..870773892199 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.js @@ -44,10 +44,10 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var v = mode( NaN, 0.5 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = mode( 10.0, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -56,19 +56,19 @@ tape( 'if provided `alpha <= 1`, the function returns `NaN`', function test( t ) var y; y = mode( 0.5, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -77,19 +77,19 @@ tape( 'if provided `beta <= 1`, the function returns `NaN`', function test( t ) var y; y = mode( 2.0, 0.5 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( 1.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.native.js index 63a2557c8101..1962d712403e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mode/test/test.native.js @@ -53,10 +53,10 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { var v = mode( NaN, 0.5 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = mode( 10.0, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -65,19 +65,19 @@ tape( 'if provided `alpha <= 1`, the function returns `NaN`', opts, function tes var y; y = mode( 0.5, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -86,19 +86,19 @@ tape( 'if provided `beta <= 1`, the function returns `NaN`', opts, function test var y; y = mode( 2.0, 0.5 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( 1.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = mode( NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.js index 69cc5f4f6b58..7cc3f5b12b94 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.js @@ -21,8 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var uniform = require( '@stdlib/random/base/uniform' ); -var Float64Array = require( '@stdlib/array/float64' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -34,24 +33,21 @@ var pdf = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var x; var y; var i; - len = 100; - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - alpha[ i ] = uniform( EPS, 100.0 ); - beta[ i ] = uniform( EPS, 100.0 ); - x[ i ] = uniform( EPS, 2.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, EPS, 100.0, opts ); + beta = uniform( 100, EPS, 100.0, opts ); + x = uniform( 100, EPS, 2.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = pdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] ); + y = pdf( x[ i % x.length ], alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -68,24 +64,23 @@ bench( pkg+':factory', function benchmark( b ) { var mypdf; var alpha; var beta; - var len; + var opts; var x; var y; var i; + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, EPS, 2.0, opts ); + alpha = 100.56789; beta = 55.54321; mypdf = pdf.factory( alpha, beta ); - len = 100; - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - x[ i ] = uniform( EPS, 2.0 ); - } - b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mypdf( x[ i % len ] ); + y = mypdf( x[ i % x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.native.js index 1f723be46cc9..8f2c9254f745 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/benchmark/benchmark.native.js @@ -22,8 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var uniform = require( '@stdlib/random/base/uniform' ); -var Float64Array = require( '@stdlib/array/float64' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var EPS = require( '@stdlib/constants/float64/eps' ); @@ -43,24 +42,21 @@ var opts = { bench( pkg+'::native', opts, function benchmark( b ) { var alpha; var beta; - var len; + var opts; var x; var y; var i; - len = 100; - alpha = new Float64Array( len ); - beta = new Float64Array( len ); - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - alpha[ i ] = uniform( EPS, 100.0 ); - beta[ i ] = uniform( EPS, 100.0 ); - x[ i ] = uniform( EPS, 2.0 ); - } + opts = { + 'dtype': 'float64' + }; + alpha = uniform( 100, EPS, 100.0, opts ); + beta = uniform( 100, EPS, 100.0, opts ); + x = uniform( 100, EPS, 2.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = pdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] ); + y = pdf( x[ i % x.length ], alpha[ i % alpha.length ], beta[ i % beta.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.factory.js index 386a37197d0e..edc70a28890e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.factory.js @@ -56,23 +56,23 @@ tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', pdf = factory( 1.0, 1.0 ); y = pdf( NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NaN, 1.0 ); y = pdf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( 1.0, NaN ); y = pdf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NaN, NaN ); y = pdf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NaN, NaN ); y = pdf( NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -83,22 +83,22 @@ tape( 'if provided a valid `alpha` and `beta`, the function returns a function w pdf = factory( 0.5, 1.0 ); y = pdf( NINF ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( PINF ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -100.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 100.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -0.5 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 1.5 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); @@ -110,26 +110,26 @@ tape( 'if provided `beta <= 0`, the created function always returns `NaN`', func pdf = factory( 0.0, -1.0 ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( 0.0, NINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( PINF, NINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NINF, NINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NaN, NINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -141,26 +141,26 @@ tape( 'if provided `alpha <= 0`, the created function always returns `NaN`', fun pdf = factory( -1.0, 0.5 ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NINF, 1.0 ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NINF, PINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NINF, NINF ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); pdf = factory( NINF, NaN ); y = pdf( 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -168,42 +168,42 @@ tape( 'if provided `alpha <= 0`, the created function always returns `NaN`', fun tape( 'if provided `alpha = 1`, the created function returns `beta` for `x` equal to zero', function test( t ) { var pdf = factory( 1.0, 2.0 ); var y = pdf( 0.0 ); - t.equal( y, 2.0, 'returns 2' ); + t.equal( y, 2.0, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha > 1`, the created function returns `0` for `x` equal to zero', function test( t ) { var pdf = factory( 1.5, 2.0 ); var y = pdf( 0.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha < 1`, the created function returns `+Infinity` for `x` equal to zero', function test( t ) { var pdf = factory( 0.5, 2.0 ); var y = pdf( 0.0 ); - t.equal( y, PINF, 'returns +Infinity' ); + t.equal( y, PINF, 'returns expected value' ); t.end(); }); tape( 'if provided `beta = 1`, the created function returns `alpha` for `x` equal to one', function test( t ) { var pdf = factory( 3.0, 1.0 ); var y = pdf( 1.0 ); - t.equal( y, 3.0, 'returns 3' ); + t.equal( y, 3.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta > 1`, the created function returns `0` for `x` equal to one', function test( t ) { var pdf = factory( 1.5, 2.0 ); var y = pdf( 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta < 1`, the created function returns `+Infinity` for `x` equal to one', function test( t ) { var pdf = factory( 1.5, 0.5 ); var y = pdf( 1.0 ); - t.equal( y, PINF, 'returns +Infinity' ); + t.equal( y, PINF, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.native.js index f0d18e05bdd3..458870623446 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.native.js @@ -55,32 +55,32 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { var y = pdf( NaN, 1.0, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, NaN, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, 1.0, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided a number outside [0,1] for `x` and a valid `alpha` and `beta`, the function returns `0`', opts, function test( t ) { var y = pdf( PINF, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( NINF, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 100.0, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -100.0, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 1.5, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -0.5, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); @@ -89,22 +89,22 @@ tape( 'if provided `alpha <= 0`, the function returns `NaN`', opts, function tes var y; y = pdf( 2.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -113,59 +113,59 @@ tape( 'if provided `beta <= 0`, the function returns `NaN`', opts, function test var y; y = pdf( 2.0, 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, 1.0, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha = 1`, the created function returns `beta` for `x` equal to zero', opts, function test( t ) { var y = pdf( 0.0, 1.0, 2.0 ); - t.equal( y, 2.0, 'returns 2' ); + t.equal( y, 2.0, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha > 1`, the created function returns `0` for `x` equal to zero', opts, function test( t ) { var y = pdf( 0.0, 1.5, 2.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha < 1`, the created function returns `+Infinity` for `x` equal to zero', opts, function test( t ) { var y = pdf( 0.0, 0.5, 2.0 ); - t.equal( y, PINF, 'returns +Infinity' ); + t.equal( y, PINF, 'returns expected value' ); t.end(); }); tape( 'if provided `beta = 1`, the created function returns `alpha` for `x` equal to one', opts, function test( t ) { var y = pdf( 1.0, 3.0, 1.0 ); - t.equal( y, 3.0, 'returns 3' ); + t.equal( y, 3.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta > 1`, the created function returns `0` for `x` equal to one', opts, function test( t ) { var y = pdf( 1.0, 1.5, 2.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta < 1`, the created function returns `+Infinity` for `x` equal to one', opts, function test( t ) { var y = pdf( 1.0, 1.5, 0.5 ); - t.equal( y, PINF, 'returns +Infinity' ); + t.equal( y, PINF, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.pdf.js index e66a8be17a67..18d05ff35f0c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.pdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/pdf/test/test.pdf.js @@ -46,32 +46,32 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var y = pdf( NaN, 1.0, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, NaN, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, 1.0, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided a number outside [0,1] for `x` and a valid `alpha` and `beta`, the function returns `0`', function test( t ) { var y = pdf( PINF, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( NINF, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 100.0, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -100.0, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( 1.5, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); y = pdf( -0.5, 1.0, 1.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); @@ -80,22 +80,22 @@ tape( 'if provided `alpha <= 0`, the function returns `NaN`', function test( t ) var y; y = pdf( 2.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, -1.0, 2.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, 1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, PINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NaN ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -104,35 +104,35 @@ tape( 'if provided `beta <= 0`, the function returns `NaN`', function test( t ) var y; y = pdf( 2.0, 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, 2.0, -1.0 ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, 1.0, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, PINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NINF, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, NaN, NINF ); - t.equal( isnan( y ), true, 'returns NaN' ); + t.equal( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha = 1`, the created function returns `beta` for `x` equal to zero', function test( t ) { var y = pdf( 0.0, 1.0, 2.0 ); - t.equal( y, 2.0, 'returns 2' ); + t.equal( y, 2.0, 'returns expected value' ); t.end(); }); tape( 'if provided `alpha > 1`, the created function returns `0` for `x` equal to zero', function test( t ) { var y = pdf( 0.0, 1.5, 2.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); @@ -144,19 +144,19 @@ tape( 'if provided `alpha < 1`, the created function returns `+Infinity` for `x` tape( 'if provided `beta = 1`, the created function returns `alpha` for `x` equal to one', function test( t ) { var y = pdf( 1.0, 3.0, 1.0 ); - t.equal( y, 3.0, 'returns 3' ); + t.equal( y, 3.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta > 1`, the created function returns `0` for `x` equal to one', function test( t ) { var y = pdf( 1.0, 1.5, 2.0 ); - t.equal( y, 0.0, 'returns 0' ); + t.equal( y, 0.0, 'returns expected value' ); t.end(); }); tape( 'if provided `beta < 1`, the created function returns `+Infinity` for `x` equal to one', function test( t ) { var y = pdf( 1.0, 1.5, 0.5 ); - t.equal( y, PINF, 'returns +Infinity' ); + t.equal( y, PINF, 'returns expected value' ); t.end(); });