diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.js index bb6cde82db90..17ad32064103 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/sincos/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 sin = require( '@stdlib/math/base/special/sin' ); var cos = require( '@stdlib/math/base/special/cos' ); @@ -36,10 +36,11 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = sincos( x ); + y = sincos( x[ i%x.length ] ); if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } @@ -57,11 +58,12 @@ bench( pkg+'::separate-evaluation', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = [ sin( x ), cos( x ) ]; + y = [ sin( x[ i%x.length ] ), cos( x[ i%x.length ] ) ]; if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } @@ -79,11 +81,12 @@ bench( pkg+':assign', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - sincos.assign( x, y, 1, 0 ); + sincos.assign( x[ i%x.length ], y, 1, 0 ); if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } @@ -101,12 +104,13 @@ bench( pkg+'::separate-evaluation,in-place', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y[0] = sin( x ); - y[1] = cos( x ); + y[0] = sin( x[ i%x.length ] ); + y[1] = cos( x[ i%x.length ] ); if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } @@ -124,10 +128,11 @@ bench( pkg+'::built-in', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = [ Math.sin( x ), Math.cos( x ) ]; // eslint-disable-line stdlib/no-builtin-math + y = [ Math.sin( x[ i%x.length ] ), Math.cos( x[ i%x.length ] ) ]; // eslint-disable-line stdlib/no-builtin-math if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } @@ -145,12 +150,13 @@ bench( pkg+'::built-in,in-place', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y[0] = Math.sin( x ); // eslint-disable-line stdlib/no-builtin-math - y[1] = Math.cos( x ); // eslint-disable-line stdlib/no-builtin-math + y[0] = Math.sin( x[ i%x.length ] ); // eslint-disable-line stdlib/no-builtin-math + y[1] = Math.cos( x[ i%x.length ] ); // eslint-disable-line stdlib/no-builtin-math if ( isnan( y[0] ) || isnan( y[1] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.native.js index b8f6bd11373c..ac693c1361ad 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/sincos/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, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 20.0 ) - 10.0; - y = sincos( x ); + y = sincos( x[ i%x.length ] ); if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/benchmark.c index d62a5aa1f739..a90c27e53dd7 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/benchmark.c @@ -89,18 +89,21 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; - double x; double y; double z; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0 * rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0 * rand_double() ) - 10.0; - y = sin( x ); - z = cos( x ); + y = sin( x[ i%100 ] ); + z = cos( x[ i%100 ] ); if ( y != y || z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/cephes/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/cephes/benchmark.c index 44e239f1e4dc..cbda2c22433d 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/cephes/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/cephes/benchmark.c @@ -94,17 +94,20 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; - double x; double y; double z; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0*rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0*rand_double() ) - 10.0; - sincos( x, &y, &z, 0 ); + sincos( x[ i%100 ], &y, &z, 0 ); if ( y != y || z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/native/benchmark.c index d06a3ec598a9..812ff1a98081 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincos/benchmark/c/native/benchmark.c @@ -90,17 +90,20 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; double cosine; double sine; - double x; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0 * rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0 * rand_double() ) - 10.0; - stdlib_base_sincos( x, &sine, &cosine ); + stdlib_base_sincos( x[ i%100 ], &sine, &cosine ); if ( cosine != cosine || sine != sine ) { printf( "unexpected results\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/sincosd/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincosd/benchmark/c/native/benchmark.c index 7fe87883122d..8068c1b74945 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincosd/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincosd/benchmark/c/native/benchmark.c @@ -90,17 +90,20 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; double cosine; double sine; - double x; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0 * rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0 * rand_double() ) - 10.0; - stdlib_base_sincosd( x, &sine, &cosine ); + stdlib_base_sincosd( x[ i%100 ], &sine, &cosine ); if ( cosine != cosine || sine != sine ) { printf( "unexpected results\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.js index 362cefe07c94..a2d600acfb2e 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/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 sinpi = require( '@stdlib/math/base/special/sinpi' ); var cospi = require( '@stdlib/math/base/special/cospi' ); @@ -37,10 +37,11 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = sincospi( x ); + y = sincospi( x[ i%x.length ] ); if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } @@ -58,11 +59,12 @@ bench( pkg+'::separate-evaluation', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = [ sinpi( x ), cospi( x ) ]; + y = [ sinpi( x[ i%x.length ] ), cospi( x[ i%x.length ] ) ]; if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } @@ -80,11 +82,12 @@ bench( pkg+':assign', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - sincospi.assign( x, y, 1, 0 ); + sincospi.assign( x[ i%x.length ], y, 1, 0 ); if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } @@ -102,12 +105,13 @@ bench( pkg+'::separate-evaluation,in-place', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y[ 0 ] = sinpi( x ); - y[ 1 ] = cospi( x ); + y[ 0 ] = sinpi( x[ i%x.length ] ); + y[ 1 ] = cospi( x[ i%x.length ] ); if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } @@ -125,10 +129,11 @@ bench( pkg+'::built-in', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y = [ Math.sin( PI*x ), Math.cos( PI*x ) ]; // eslint-disable-line stdlib/no-builtin-math + y = [ Math.sin( PI*x[ i%x.length ] ), Math.cos( PI*x[ i%x.length ] ) ]; // eslint-disable-line stdlib/no-builtin-math if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } @@ -146,12 +151,13 @@ bench( pkg+'::built-in,in-place', function benchmark( b ) { var y; var i; + x = uniform( 100, -10.0, 10.0 ); y = [ 0.0, 0.0 ]; + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*20.0 ) - 10.0; - y[ 0 ] = Math.sin( PI*x ); // eslint-disable-line stdlib/no-builtin-math - y[ 1 ] = Math.cos( PI*x ); // eslint-disable-line stdlib/no-builtin-math + y[ 0 ] = Math.sin( PI*x[ i%x.length ] ); // eslint-disable-line stdlib/no-builtin-math + y[ 1 ] = Math.cos( PI*x[ i%x.length ] ); // eslint-disable-line stdlib/no-builtin-math if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.native.js index 7ab03be6f4c2..be9d30265c4a 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/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, -10.0, 10.0 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * 20.0 ) - 10.0; - y = sincospi( x ); + y = sincospi( x[ i%x.length ] ); if ( isnan( y[ 0 ] ) || isnan( y[ 1 ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/benchmark.c index 6e896ca0c047..e6877b709139 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/benchmark.c @@ -89,18 +89,21 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; - double x; double y; double z; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0 * rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0 * rand_double() ) - 10.0; - y = sin( M_PI * x ); - z = cos( M_PI * x ); + y = sin( M_PI * x[ i%100 ] ); + z = cos( M_PI * x[ i%100 ] ); if ( y != y || z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/native/benchmark.c index 5c945430bf29..fbc93216f1ab 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/native/benchmark.c @@ -90,24 +90,27 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; double cosine; double sine; - double x; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 20.0 * rand_double() ) - 10.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 20.0 * rand_double() ) - 10.0; - stdlib_base_sincospi( x, &sine, &cosine ); - if ( cosine != cosine || sine != sine) { + stdlib_base_sincospi( x[ i%100 ], &sine, &cosine ); + if ( cosine != cosine || sine != sine ) { printf( "unexpected results\n" ); break; } } elapsed = tic() - t; - if ( cosine != cosine || sine != sine) { + if ( cosine != cosine || sine != sine ) { printf( "unexpected results\n" ); } return elapsed; diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.assign.js index 5f1d209bdda5..5f9c23e8ae5b 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.assign.js @@ -52,8 +52,8 @@ tape( 'if provided negative infinity, the function returns `[NaN,NaN]`', functio out = [ 0.0, 0.0 ]; y = sincospi( NINF, out, 1, 0 ); t.equal( y, out, 'returns output array' ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided negative infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided negative infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); @@ -64,8 +64,8 @@ tape( 'if provided positive infinity, the function returns `[NaN,NaN]`', functio out = [ 0.0, 0.0 ]; y = sincospi( PINF, out, 1, 0 ); t.equal( y, out, 'returns output array' ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided positive infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided positive infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); @@ -76,8 +76,8 @@ tape( 'if provided `NaN`, the function returns `[NaN,NaN]`', function test( t ) out = [ 0.0, 0.0 ]; y = sincospi( NaN, out, 1, 0 ); t.equal( y, out, 'returns output array' ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided NaN' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided NaN' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); @@ -113,8 +113,8 @@ tape( 'if provided a value exceeding `2**53` (max (unsafe) float64 integer), the out = [ 0.0, 0.0 ]; y = sincospi( x + i, out, 1, 0 ); t.equal( y, out, 'returns output array' ); - t.equal( y[ 0 ], 0.0, 'returns 0.0' ); - t.equal( y[ 1 ], 1.0, 'returns 1.0' ); + t.equal( y[ 0 ], 0.0, 'returns expected value' ); + t.equal( y[ 1 ], 1.0, 'returns expected value' ); } t.end(); }); @@ -177,8 +177,8 @@ tape( 'the function supports providing an output typed array', function test( t parts = sincospi( NaN, out, 1, 0 ); t.strictEqual( parts, out, 'returns output array' ); - t.equal( isnan( parts[ 0 ] ), true, 'returns NaN when provided NaN' ); - t.equal( isnan( parts[ 1 ] ), true, 'returns NaN when provided NaN' ); + t.equal( isnan( parts[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( parts[ 1 ] ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.main.js index 06922f6e8279..eaf6d86a620c 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.main.js @@ -46,22 +46,22 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided negative infinity, the function returns `[NaN,NaN]`', function test( t ) { var y = sincospi( NINF ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided negative infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided negative infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); tape( 'if provided positive infinity, the function returns `[NaN,NaN]`', function test( t ) { var y = sincospi( PINF ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided positive infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided positive infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `NaN`, the function returns `[NaN,NaN]`', function test( t ) { var y = sincospi( NaN ); - t.equal( isnan( y[ 0 ] ), true, 'returns NaN when provided NaN' ); - t.equal( isnan( y[ 1 ] ), true, 'returns NaN when provided NaN' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); @@ -91,8 +91,8 @@ tape( 'if provided a value exceeding `2**53` (max (unsafe) float64 integer), the x = pow( 2.0, 53 ) + 1.0; for ( i = 0; i < 100; i++ ) { y = sincospi( x+i ); - t.equal( y[ 0 ], 0.0, 'returns 0.0' ); - t.equal( y[ 1 ], 1.0, 'returns 1.0' ); + t.equal( y[ 0 ], 0.0, 'returns expected value' ); + t.equal( y[ 1 ], 1.0, 'returns expected value' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.native.js index aae145cd4520..5a56417ef00e 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/test/test.native.js @@ -55,22 +55,22 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'if provided negative infinity, the function returns `[NaN,NaN]`', opts, function test( t ) { var y = sincospi( NINF ); - t.equal( isnan( y[ 0 ] ), true, 'returns expected value when provided negative infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns expected value when provided negative infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); tape( 'if provided positive infinity, the function returns `[NaN,NaN]`', opts, function test( t ) { var y = sincospi( PINF ); - t.equal( isnan( y[ 0 ] ), true, 'returns expected value when provided positive infinity' ); - t.equal( isnan( y[ 1 ] ), true, 'returns expected value when provided positive infinity' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `NaN`, the function returns `[NaN,NaN]`', opts, function test( t ) { var y = sincospi( NaN ); - t.equal( isnan( y[ 0 ] ), true, 'returns expected value when provided NaN' ); - t.equal( isnan( y[ 1 ] ), true, 'returns expected value when provided NaN' ); + t.equal( isnan( y[ 0 ] ), true, 'returns expected value' ); + t.equal( isnan( y[ 1 ] ), true, 'returns expected value' ); t.end(); }); @@ -100,8 +100,8 @@ tape( 'if provided a value exceeding `2**53` (max (unsafe) float64 integer), the x = pow( 2.0, 53 ) + 1.0; for ( i = 0; i < 100; i++ ) { y = sincospi( x+i ); - t.equal( y[ 0 ], 0.0, 'returns 0.0' ); - t.equal( y[ 1 ], 1.0, 'returns 1.0' ); + t.equal( y[ 0 ], 0.0, 'returns expected value' ); + t.equal( y[ 1 ], 1.0, 'returns expected value' ); } t.end(); });