diff --git a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.js index f621831aa9c2..4ae7bdb67f3b 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/gammasgn/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/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var gammasgn = require( './../lib' ); @@ -34,10 +34,11 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, 0.0, 171.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*171.0 ) - 0.0; - y = gammasgn( x ); + y = gammasgn( x[ i%x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.native.js index 9679d22d17e5..96ef9c15da9c 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/benchmark.native.js @@ -22,7 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +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,10 +43,11 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; + x = uniform( 100, 0.0, 171.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 171.0 ) - 0.0; - y = gammasgn( x ); + y = gammasgn( x[ i%x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/c/native/benchmark.c index fd4b545b86eb..a8742211708f 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/gammasgn/benchmark/c/native/benchmark.c @@ -91,15 +91,18 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; - double x; + double x[ 100 ]; double y; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 171.0 * rand_double() ) - 0.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 171.0 * rand_double() ) - 0.0; - y = stdlib_base_gammasgn( x ); + y = stdlib_base_gammasgn( x[ i%100 ] ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.js b/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.js index 4bc5fefd0b31..7e052c03d089 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.js @@ -125,19 +125,19 @@ tape( 'the function computes the sign of the gamma function for medium negative tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { var v = gammasgn( NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `+0`', function test( t ) { var v = gammasgn( +0.0 ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `-0`', function test( t ) { var v = gammasgn( -0.0 ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -147,7 +147,7 @@ tape( 'the function returns `+0` if provided a negative integer', function test( for ( i = 0; i >= -100; i-- ) { v = gammasgn( i ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.native.js index df365d4a8658..0fb41c1a125b 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/gammasgn/test/test.native.js @@ -134,19 +134,19 @@ tape( 'the function computes the sign of the gamma function for medium negative tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { var v = gammasgn( NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) { var v = gammasgn( +0.0 ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `-0`', opts, function test( t ) { var v = gammasgn( -0.0 ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -156,7 +156,7 @@ tape( 'the function returns `+0` if provided a negative integer', opts, function for ( i = 0; i >= -100; i-- ) { v = gammasgn( i ); - t.equal( isPositiveZero( v ), true, 'returns 0' ); + t.equal( isPositiveZero( v ), true, 'returns expected value' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/benchmark/benchmark.js index 9a6985cec170..01881492c2e7 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/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/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -37,13 +37,14 @@ bench( pkg+'::regularized,upper', function benchmark( assert ) { var b; var i; + x = uniform( 100, 0.0, 1.0 ); + a = uniform( 100, EPS, 1000.0 ); + b = uniform( 100, EPS, 1000.0 ); + out = [ 0.0, 0.0 ]; assert.tic(); for ( i = 0; i < assert.iterations; i++ ) { - x = randu(); - a = ( randu()*1000.0 ) + EPS; - b = ( randu()*1000.0 ) + EPS; - out = kernelBetainc( x, a, b, true, true, out, 1, 0 ); + out = kernelBetainc( x[ i%x.length ], a[ i%a.length ], b[ i%b.length ], true, true, out, 1, 0 ); if ( isnan( out[ 0 ] ) || isnan( out[ 1 ] ) ) { assert.fail( 'should not return NaN' ); } @@ -63,13 +64,14 @@ bench( pkg+'::unregularized,upper', function benchmark( assert ) { var b; var i; + x = uniform( 100, 0.0, 1.0 ); + a = uniform( 100, EPS, 1000.0 ); + b = uniform( 100, EPS, 1000.0 ); + out = [ 0.0, 0.0 ]; assert.tic(); for ( i = 0; i < assert.iterations; i++ ) { - x = randu(); - a = ( randu()*1000.0 ) + EPS; - b = ( randu()*1000.0 ) + EPS; - out = kernelBetainc( x, a, b, false, true, out, 1, 0 ); + out = kernelBetainc( x[ i%x.length ], a[ i%a.length ], b[ i%b.length ], false, true, out, 1, 0 ); if ( isnan( out[ 0 ] ) || isnan( out[ 1 ] ) ) { assert.fail( 'should not return NaN' ); } @@ -89,13 +91,14 @@ bench( pkg+'::regularized,lower', function benchmark( assert ) { var b; var i; + x = uniform( 100, 0.0, 1.0 ); + a = uniform( 100, EPS, 1000.0 ); + b = uniform( 100, EPS, 1000.0 ); + out = [ 0.0, 0.0 ]; assert.tic(); for ( i = 0; i < assert.iterations; i++ ) { - x = randu(); - a = ( randu()*1000.0 ) + EPS; - b = ( randu()*1000.0 ) + EPS; - out = kernelBetainc( x, a, b, true, false, out, 1, 0 ); + out = kernelBetainc( x[ i%x.length ], a[ i%a.length ], b[ i%b.length ], true, false, out, 1, 0 ); if ( isnan( out[ 0 ] ) || isnan( out[ 1 ] ) ) { assert.fail( 'should not return NaN' ); } @@ -115,13 +118,14 @@ bench( pkg+'::unregularized,lower', function benchmark( assert ) { var b; var i; + x = uniform( 100, 0.0, 1.0 ); + a = uniform( 100, EPS, 1000.0 ); + b = uniform( 100, EPS, 1000.0 ); + out = [ 0.0, 0.0 ]; assert.tic(); for ( i = 0; i < assert.iterations; i++ ) { - x = randu(); - a = ( randu()*1000.0 ) + EPS; - b = ( randu()*1000.0 ) + EPS; - out = kernelBetainc( x, a, b, false, false, out, 1, 0 ); + out = kernelBetainc( x[ i%x.length ], a[ i%a.length ], b[ i%b.length ], false, false, out, 1, 0 ); if ( isnan( out[ 0 ] ) || isnan( out[ 1 ] ) ) { assert.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/test/test.js index 9649b072cacf..3f19a13d2aa6 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/test/test.js @@ -36,74 +36,74 @@ tape( 'main export is a function', function test( t ) { tape( 'the function returns `[ NaN, NaN ]` if `x` is outside `[0,1]`', function test( t ) { var val = kernelBetainc( -0.2, 1.0, 1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( -0.2, 1.0, 1.0, false, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( -0.2, 1.0, 1.0, true, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( -0.2, 1.0, 1.0, false, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 1.1, 1.0, 1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 1.1, 1.0, 1.0, false, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 1.1, 1.0, 1.0, false, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 1.1, 1.0, 1.0, true, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `[ NaN, NaN ]` if `x` is `NaN`', function test( t ) { var val = kernelBetainc( NaN, 1.0, 1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `[ NaN, NaN ]` if negative `a` or `b`', function test( t ) { var val = kernelBetainc( 0.5, -1.0, 1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, 1.0, false, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, 1.0, true, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, 1.0, false, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, 1.0, -1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, 1.0, -1.0, false, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, 1.0, -1.0, true, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, 1.0, -1.0, false, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, -1.0, true, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, -1.0, false, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, -1.0, false, true ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); val = kernelBetainc( 0.5, -1.0, -1.0, true, false ); - t.equal( isNaNArray( val ), true, 'returns array of NaNs' ); + t.equal( isNaNArray( val ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/benchmark/benchmark.js index 8049154b5bd9..297558ad974d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/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/array/uniform' ); var isNumberArray = require( '@stdlib/assert/is-number-array' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -37,12 +37,13 @@ bench( pkg, function benchmark( assert ) { var b; var i; + p = uniform( 100, 0.0, 1.0 ); + a = uniform( 100, EPS, 1000.0 ); + b = uniform( 100, EPS, 1000.0 ); + assert.tic(); for ( i = 0; i < assert.iterations; i++ ) { - p = randu(); - a = ( randu()*1000.0 ) + EPS; - b = ( randu()*1000.0 ) + EPS; - y = kernelBetaincinv( a, b, p, 1.0-p ); + y = kernelBetaincinv( a[ i%a.length ], b[ i%b.length ], p[ i%p.length ], 1.0-p ); if ( !isNumberArray( y ) ) { assert.fail( 'should return an array of numbers' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.js index 110a9770e994..e39841ad68d1 100644 --- a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.js @@ -21,8 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; var lcm = require( './../lib' ); @@ -36,11 +35,12 @@ bench( pkg, function benchmark( b ) { var z; var i; + x = discreteUniform( 100, 0, 50 ); + y = discreteUniform( 100, 0, 50 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = round( randu()*50.0 ); - y = round( randu()*50.0 ); - z = lcm( x, y ); + z = lcm( x[ i%x.length ], y[ i%y.length ] ); if ( isnan( z ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.native.js index 2a04d9c69d04..d75eab16e4c4 100644 --- a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/benchmark.native.js @@ -22,8 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -45,11 +44,12 @@ bench( pkg+'::native', opts, function benchmark( b ) { var z; var i; + x = discreteUniform( 100, 0, 50 ); + y = discreteUniform( 100, 0, 50 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = round( randu() * 50.0 ); - y = round( randu() * 50.0 ); - z = lcm( x, y ); + z = lcm( x[ i%x.length ], y[ i%y.length ] ); if ( isnan( z ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/c/native/benchmark.c index 1208d6fb259b..b726fd8169fb 100644 --- a/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/lcm/benchmark/c/native/benchmark.c @@ -91,17 +91,20 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; - double x; - double y; + double x[ 100 ]; + double y[ 100 ]; double z; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = round( rand_double() * 500.0 ); + y[ i ] = round( rand_double() * 500.0 ); + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = round( rand_double() * 500.0 ); - y = round( rand_double() * 500.0 ); - z = stdlib_base_lcm( x, y ); + z = stdlib_base_lcm( x[ i%100 ], y[ i%100 ] ); if ( z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/lcm/test/test.js b/lib/node_modules/@stdlib/math/base/special/lcm/test/test.js index 9620b1ae160c..9876831d02df 100644 --- a/lib/node_modules/@stdlib/math/base/special/lcm/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/lcm/test/test.js @@ -39,13 +39,13 @@ tape( 'the function returns `NaN` if either argument is `NaN`', function test( t var v; v = lcm( NaN, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( NaN, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -54,13 +54,13 @@ tape( 'the function returns `NaN` if either argument is `+infinity`', function t var v; v = lcm( PINF, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, PINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( PINF, PINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -69,13 +69,13 @@ tape( 'the function returns `NaN` if either argument is `-infinity`', function t var v; v = lcm( NINF, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, NINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( NINF, NINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -84,26 +84,26 @@ tape( 'the function returns `NaN` if either argument is not an integer value', f var v; v = lcm( 3.14, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, 3.14 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 3.14, 6.18 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `0` if either argument is `0`', function test( t ) { var v = lcm( 0, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 2, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 0, -3 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); t.end(); }); @@ -112,37 +112,37 @@ tape( 'the function computes the least common multiple', function test( t ) { var v; v = lcm( 0, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 1, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 0, 1 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 6, 4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( 6, -4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( -6, -4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( 2, 8 ); - t.strictEqual( v, 8, 'returns 8' ); + t.strictEqual( v, 8, 'returns expected value' ); v = lcm( 15, 20 ); - t.strictEqual( v, 60, 'returns 60' ); + t.strictEqual( v, 60, 'returns expected value' ); v = lcm( 20, 15 ); - t.strictEqual( v, 60, 'returns 60' ); + t.strictEqual( v, 60, 'returns expected value' ); v = lcm( 35, -21 ); - t.strictEqual( v, 105, 'returns 105' ); + t.strictEqual( v, 105, 'returns expected value' ); v = lcm( 48, 18 ); - t.strictEqual( v, 144, 'returns 144' ); + t.strictEqual( v, 144, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/lcm/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/lcm/test/test.native.js index 41518076578a..910f42ed7f2e 100644 --- a/lib/node_modules/@stdlib/math/base/special/lcm/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/lcm/test/test.native.js @@ -48,13 +48,13 @@ tape( 'the function returns `NaN` if either argument is `NaN`', opts, function t var v; v = lcm( NaN, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( NaN, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -63,13 +63,13 @@ tape( 'the function returns `NaN` if either argument is `+infinity`', opts, func var v; v = lcm( PINF, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, PINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( PINF, PINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -78,13 +78,13 @@ tape( 'the function returns `NaN` if either argument is `-infinity`', opts, func var v; v = lcm( NINF, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, NINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( NINF, NINF ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -93,26 +93,26 @@ tape( 'the function returns `NaN` if either argument is not an integer value', o var v; v = lcm( 3.14, 10 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 10, 3.14 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); v = lcm( 3.14, 6.18 ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `0` if either argument is `0`', opts, function test( t ) { var v = lcm( 0, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 2, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 0, -3 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); t.end(); }); @@ -121,37 +121,37 @@ tape( 'the function computes the least common multiple', opts, function test( t var v; v = lcm( 0, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 1, 0 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 0, 1 ); - t.strictEqual( v, 0, 'returns 0' ); + t.strictEqual( v, 0, 'returns expected value' ); v = lcm( 6, 4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( 6, -4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( -6, -4 ); - t.strictEqual( v, 12, 'returns 12' ); + t.strictEqual( v, 12, 'returns expected value' ); v = lcm( 2, 8 ); - t.strictEqual( v, 8, 'returns 8' ); + t.strictEqual( v, 8, 'returns expected value' ); v = lcm( 15, 20 ); - t.strictEqual( v, 60, 'returns 60' ); + t.strictEqual( v, 60, 'returns expected value' ); v = lcm( 20, 15 ); - t.strictEqual( v, 60, 'returns 60' ); + t.strictEqual( v, 60, 'returns expected value' ); v = lcm( 35, -21 ); - t.strictEqual( v, 105, 'returns 105' ); + t.strictEqual( v, 105, 'returns expected value' ); v = lcm( 48, 18 ); - t.strictEqual( v, 144, 'returns 144' ); + t.strictEqual( v, 144, 'returns expected value' ); t.end(); });