diff --git a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.js index 554990fe8fdf..eb87aa512675 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/atanh/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 atanh = require( './../lib' ); @@ -34,10 +34,13 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, -1.0, 1.0, { + 'dtype': 'float64' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*2.0 ) - 1.0; - y = atanh( x ); + y = atanh( x[ i%x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.native.js index de8cfd9a2abb..161a977c5cdd 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/atanh/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,13 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; + x = uniform( 100, -1.0, 1.0, { + 'dtype': 'float64' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 2.0 ) - 1.0; - y = atanh( x ); + y = atanh( x[ i%x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/c/native/benchmark.c index de893c26daa4..9f5c7ad65478 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/atanh/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/fast/atanh/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 ] = ( rand_double() * 2.0 ) - 1.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( rand_double() * 2.0 ) - 1.0; - y = stdlib_base_fast_atanh( x ); + y = stdlib_base_fast_atanh( x[ i%100 ] ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.js b/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.js index ffbefa3aeed7..8409b8f88472 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.js @@ -97,26 +97,26 @@ tape( 'the function computes the hyperbolic arctangent (positive values)', funct tape( 'the function underflows if provided a value negligible compared to unity (negative)', function test( t ) { var x = -EPS / 10.0; var v = atanh( x ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function underflows if provided a value negligible compared to unity (positive)', function test( t ) { var x = EPS / 10.0; var v = atanh( x ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+Infinity` if provided `1.0`', function test( t ) { var v = atanh( 1.0 ); - t.strictEqual( v, PINF, 'returns +Infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); t.end(); }); tape( 'the function returns `-Infinity` if provided `-1.0`', function test( t ) { var v = atanh( -1.0 ); - t.strictEqual( v, NINF, 'returns -Infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); t.end(); }); @@ -126,7 +126,7 @@ tape( 'the function returns `NaN` if provided a value less than `-1`', function for ( i = 0; i < 1e3; i++ ) { v = -(randu()*1.0e6) - (1.0+EPS); - t.strictEqual( isnan( atanh( v ) ), true, 'returns NaN when provided '+v ); + t.strictEqual( isnan( atanh( v ) ), true, 'returns expected value when provided '+v ); } t.end(); }); @@ -137,25 +137,25 @@ tape( 'the function returns `NaN` if provided a value greater than `1`', functio for ( i = 0; i < 1e3; i++ ) { v = ( randu()*1.0e6 ) + 1.0 + EPS; - t.strictEqual( isnan( atanh( v ) ), true, 'returns NaN when provided '+v ); + t.strictEqual( isnan( atanh( v ) ), true, 'returns expected value when provided '+v ); } t.end(); }); tape( 'the function returns `-0` if provided `-0`', function test( t ) { var v = atanh( -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `+0`', function test( t ) { var v = atanh( 0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { var v = atanh( NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.native.js index ebd5d268b4b9..206db8a16112 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/atanh/test/test.native.js @@ -106,26 +106,26 @@ tape( 'the function computes the hyperbolic arctangent (positive values)', opts, tape( 'the function underflows if provided a value negligible compared to unity (negative)', opts, function test( t ) { var x = -EPS / 10.0; var v = atanh( x ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function underflows if provided a value negligible compared to unity (positive)', opts, function test( t ) { var x = EPS / 10.0; var v = atanh( x ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+Infinity` if provided `1.0`', opts, function test( t ) { var v = atanh( 1.0 ); - t.strictEqual( v, PINF, 'returns +Infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); t.end(); }); tape( 'the function returns `-Infinity` if provided `-1.0`', opts, function test( t ) { var v = atanh( -1.0 ); - t.strictEqual( v, NINF, 'returns -Infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); t.end(); }); @@ -135,7 +135,7 @@ tape( 'the function returns `NaN` if provided a value less than `-1`', opts, fun for ( i = 0; i < 1e3; i++ ) { v = -(randu()*1.0e6) - (1.0+EPS); - t.strictEqual( isnan( atanh( v ) ), true, 'returns NaN when provided '+v ); + t.strictEqual( isnan( atanh( v ) ), true, 'returns expected value when provided '+v ); } t.end(); }); @@ -146,25 +146,25 @@ tape( 'the function returns `NaN` if provided a value greater than `1`', opts, f for ( i = 0; i < 1e3; i++ ) { v = ( randu()*1.0e6 ) + 1.0 + EPS; - t.strictEqual( isnan( atanh( v ) ), true, 'returns NaN when provided '+v ); + t.strictEqual( isnan( atanh( v ) ), true, 'returns expected value when provided '+v ); } t.end(); }); tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) { var v = atanh( -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) { var v = atanh( 0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns 0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { var v = atanh( NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/benchmark.js index 278aa3572eae..4a14d2b1175b 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/max/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 max = require( './../lib' ); @@ -30,16 +30,21 @@ var max = require( './../lib' ); // MAIN // bench( pkg, function benchmark( b ) { + var opts; var x; var y; var z; var i; + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, -5000.0, 5000.0, opts ); + y = uniform( 100, -5000.0, 5000.0, opts ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*10000.0 ) - 5000.0; - y = ( randu()*10000.0 ) - 5000.0; - z = max( x, y ); + z = max( 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/fast/max/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/benchmark.native.js index 55db3f0af263..50f316025088 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/max/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; @@ -39,16 +39,21 @@ var opts = { // MAIN // bench( pkg+'::native', opts, function benchmark( b ) { + var opts; var x; var y; var z; var i; + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, -1000.0, 1000.0, opts ); + y = uniform( 100, -1000.0, 1000.0, opts ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*2000.0 ) - 1000.0; - y = ( randu()*2000.0 ) - 1000.0; - z = max( x, y ); + z = max( 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/fast/max/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/c/native/benchmark.c index 9bfad2a18989..5324a70e8d76 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/fast/max/benchmark/c/native/benchmark.c @@ -91,17 +91,20 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; + double x[ 100 ]; + double y[ 100 ]; double t; - double x; - double y; double z; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 2000.0*rand_double() ) - 1000.0; + y[ i ] = ( 2000.0*rand_double() ) - 1000.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 2000.0*rand_double() ) - 1000.0; - y = ( 2000.0*rand_double() ) - 1000.0; - z = stdlib_base_fast_max( x, y ); + z = stdlib_base_fast_max( 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/fast/max/test/test.js b/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.js index 7a4a3a3c29fa..11011be50d4c 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.js @@ -45,10 +45,10 @@ tape( 'the function may not return `NaN` if provided a `NaN`', function test( t var v; v = max( NaN, 3.14 ); - t.strictEqual( v, 3.14, 'returns 3.14' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = max( 3.14, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -57,10 +57,10 @@ tape( 'the function returns `+infinity` if provided `+infinity`', function test( var v; v = max( PINF, 3.14 ); - t.strictEqual( v, PINF, 'returns +infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); v = max( 3.14, PINF ); - t.strictEqual( v, PINF, 'returns +infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); t.end(); }); @@ -69,16 +69,16 @@ tape( 'the function may not return a correctly signed zero', function test( t ) var v; v = max( +0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = max( -0.0, +0.0 ); - t.strictEqual( isNegativeZero( v ), false, 'does not return -0' ); + t.strictEqual( isNegativeZero( v ), false, 'returns expected value' ); v = max( -0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = max( +0.0, +0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns +0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -87,10 +87,10 @@ tape( 'the function returns the maximum value', function test( t ) { var v; v = max( 4.2, 3.14 ); - t.strictEqual( v, 4.2, 'returns max value' ); + t.strictEqual( v, 4.2, 'returns expected value' ); v = max( -4.2, 3.14 ); - t.strictEqual( v, 3.14, 'returns max value' ); + t.strictEqual( v, 3.14, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.native.js index 0cbcaa261181..767ec3e20415 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/max/test/test.native.js @@ -54,10 +54,10 @@ tape( 'the function may not return `NaN` if provided a `NaN`', opts, function te var v; v = max( NaN, 3.14 ); - t.strictEqual( v, 3.14, 'returns 3.14' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = max( 3.14, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -66,10 +66,10 @@ tape( 'the function returns `+infinity` if provided `+infinity`', opts, function var v; v = max( PINF, 3.14 ); - t.strictEqual( v, PINF, 'returns +infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); v = max( 3.14, PINF ); - t.strictEqual( v, PINF, 'returns +infinity' ); + t.strictEqual( v, PINF, 'returns expected value' ); t.end(); }); @@ -78,16 +78,16 @@ tape( 'the function may not return a correctly signed zero', opts, function test var v; v = max( +0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = max( -0.0, +0.0 ); - t.strictEqual( isNegativeZero( v ), false, 'does not return -0' ); + t.strictEqual( isNegativeZero( v ), false, 'returns expected value' ); v = max( -0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = max( +0.0, +0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns +0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -96,10 +96,10 @@ tape( 'the function returns the maximum value', opts, function test( t ) { var v; v = max( 4.2, 3.14 ); - t.strictEqual( v, 4.2, 'returns max value' ); + t.strictEqual( v, 4.2, 'returns expected value' ); v = max( -4.2, 3.14 ); - t.strictEqual( v, 3.14, 'returns max value' ); + t.strictEqual( v, 3.14, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/benchmark.js index 5842aefc9cd6..93b1f2b7ccd1 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/min/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 min = require( './../lib' ); @@ -30,16 +30,21 @@ var min = require( './../lib' ); // MAIN // bench( pkg, function benchmark( b ) { + var opts; var x; var y; var z; var i; + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, -5000.0, 5000.0, opts ); + y = uniform( 100, -5000.0, 5000.0, opts ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*10000.0 ) - 5000.0; - y = ( randu()*10000.0 ) - 5000.0; - z = min( x, y ); + z = min( 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/fast/min/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/benchmark.native.js index 00856c2d3d42..a778a69935b1 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/min/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; @@ -39,16 +39,21 @@ var opts = { // MAIN // bench( pkg+'::native', opts, function benchmark( b ) { + var opts; var x; var y; var z; var i; + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, -5000.0, 5000.0, opts ); + y = uniform( 100, -5000.0, 5000.0, opts ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*10000.0 ) - 5000.0; - y = ( randu()*10000.0 ) - 5000.0; - z = min( x, y ); + z = min( 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/fast/min/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/c/native/benchmark.c index 0ec03012e41b..cc61a90a3db6 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/fast/min/benchmark/c/native/benchmark.c @@ -91,17 +91,20 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; + double x[ 100 ]; + double y[ 100 ]; double t; - double x; - double y; double z; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 10000.0*rand_double() ) - 5000.0; + y[ i ] = ( 10000.0*rand_double() ) - 5000.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 10000.0*rand_double() ) - 5000.0; - y = ( 10000.0*rand_double() ) - 5000.0; - z = stdlib_base_fast_min( x, y ); + z = stdlib_base_fast_min( 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/fast/min/test/test.js b/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.js index a9db74f6c5c9..e57608fea3cd 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.js @@ -45,10 +45,10 @@ tape( 'the function may not return `NaN` if provided a `NaN`', function test( t var v; v = min( NaN, 3.14 ); - t.strictEqual( v, 3.14, 'returns 3.14' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = min( 3.14, NaN ); - t.strictEqual( isnan( v ), true, 'returns NaN' ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -57,10 +57,10 @@ tape( 'the function returns `-Infinity` if provided `-Infinity`', function test( var v; v = min( NINF, 3.14 ); - t.strictEqual( v, NINF, 'returns -infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); v = min( 3.14, NINF ); - t.strictEqual( v, NINF, 'returns -infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); t.end(); }); @@ -69,16 +69,16 @@ tape( 'the function may not return a correctly signed zero', function test( t ) var v; v = min( +0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = min( -0.0, +0.0 ); - t.strictEqual( isNegativeZero( v ), false, 'does not return -0' ); + t.strictEqual( isNegativeZero( v ), false, 'returns expected value' ); v = min( -0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = min( +0.0, +0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns +0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -87,10 +87,10 @@ tape( 'the function returns the minimum value', function test( t ) { var v; v = min( 4.2, 3.14 ); - t.strictEqual( v, 3.14, 'returns min value' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = min( -4.2, 3.14 ); - t.strictEqual( v, -4.2, 'returns min value' ); + t.strictEqual( v, -4.2, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.native.js index 1549de8bef70..ab4289cae4ef 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/fast/min/test/test.native.js @@ -54,7 +54,7 @@ tape( 'the function may not return `NaN` if provided a `NaN`', opts, function te var v; v = min( NaN, 3.14 ); - t.strictEqual( v, 3.14, 'returns 3.14' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = min( 3.14, NaN ); t.strictEqual( isnan( v ), true, 'returns NaN' ); @@ -66,10 +66,10 @@ tape( 'the function returns `-Infinity` if provided `-Infinity`', opts, function var v; v = min( NINF, 3.14 ); - t.strictEqual( v, NINF, 'returns -infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); v = min( 3.14, NINF ); - t.strictEqual( v, NINF, 'returns -infinity' ); + t.strictEqual( v, NINF, 'returns expected value' ); t.end(); }); @@ -78,16 +78,16 @@ tape( 'the function may not return a correctly signed zero', opts, function test var v; v = min( +0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = min( -0.0, +0.0 ); - t.strictEqual( isNegativeZero( v ), false, 'does not return -0' ); + t.strictEqual( isNegativeZero( v ), false, 'returns expected value' ); v = min( -0.0, -0.0 ); - t.strictEqual( isNegativeZero( v ), true, 'returns -0' ); + t.strictEqual( isNegativeZero( v ), true, 'returns expected value' ); v = min( +0.0, +0.0 ); - t.strictEqual( isPositiveZero( v ), true, 'returns +0' ); + t.strictEqual( isPositiveZero( v ), true, 'returns expected value' ); t.end(); }); @@ -96,10 +96,10 @@ tape( 'the function returns the minimum value', opts, function test( t ) { var v; v = min( 4.2, 3.14 ); - t.strictEqual( v, 3.14, 'returns min value' ); + t.strictEqual( v, 3.14, 'returns expected value' ); v = min( -4.2, 3.14 ); - t.strictEqual( v, -4.2, 'returns min value' ); + t.strictEqual( v, -4.2, 'returns expected value' ); t.end(); });