diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/README.md b/lib/node_modules/@stdlib/math/base/special/sincos/README.md index 8e2dc81977a2..cea6faf3a09e 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/README.md +++ b/lib/node_modules/@stdlib/math/base/special/sincos/README.md @@ -127,8 +127,8 @@ stdlib_base_sincos( 4.0, &sine, &cosine ); The function accepts the following arguments: -- **x**: `[in] double` input value. -- **sine**: `[out] double*` destination for the sine. +- **x**: `[in] double` input value. +- **sine**: `[out] double*` destination for the sine. - **cosine**: `[out] double*` destination for the cosine. ```c 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 e4a168410792..d06a3ec598a9 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 @@ -101,13 +101,13 @@ static double benchmark( void ) { for ( i = 0; i < ITERATIONS; i++ ) { x = ( 20.0 * rand_double() ) - 10.0; stdlib_base_sincos( x, &sine, &cosine ); - if ( cosine != cosine || sine != sine) { + 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/sincos/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/index.d.ts index b53299967a1d..6e494a39bcb0 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -import { Collection } from '@stdlib/types/array'; +import { NumericArray } from '@stdlib/types/array'; interface SinCos { /** @@ -67,7 +67,7 @@ interface SinCos { * var bool = ( v === out ); * // returns true */ - assign( x: number, out: Collection, stride: number, offset: number ): Collection; + assign( x: number, out: T, stride: number, offset: number ): T; } /** diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/test.ts index 35c6e30836b5..e540f4e32a74 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/special/sincos/docs/types/test.ts @@ -49,7 +49,7 @@ import sincos = require( './index' ); { const out = [ 0.0, 0.0 ]; - sincos.assign( 3.14e-319, out, 1, 0 ); // $ExpectType Collection + sincos.assign( 3.14e-319, out, 1, 0 ); // $ExpectType number[] } // The compiler throws an error if the `assign` method is provided a first argument which is not a number... diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/sincos/test/test.assign.js index 0e0a101f5b7f..2e93303749e9 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/sincos/test/test.assign.js @@ -48,42 +48,6 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function computes the sine and cosine (for -256*pi < x < 0)', function test( t ) { - var cosine; - var delta; - var sine; - var tol; - var x; - var y; - var z; - var i; - - z = [ 0.0, 0.0 ]; - x = mediumNegative.x; - sine = mediumNegative.sine; - cosine = mediumNegative.cosine; - - for ( i = 0; i < x.length; i++ ) { - y = sincos( x[i], z, 1, 0 ); - t.equal( y, z, 'returns output array' ); - if ( y[0] === sine[ i ] ) { - t.equal( y[0], sine[ i ], 'x: '+x[i]+'. Expected: '+sine[i] ); - } else { - delta = abs( y[0] - sine[i] ); - tol = EPS * abs( sine[i] ); - t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y[0]+'. Expected: '+sine[i]+'. tol: '+tol+'. delta: '+delta+'.' ); - } - if ( y[1] === cosine[ i ] ) { - t.equal( y[1], cosine[ i ], 'x: '+x[i]+'. Expected: '+cosine[i] ); - } else { - delta = abs( y[1] - cosine[i] ); - tol = EPS * abs( cosine[i] ); - t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y[1]+'. Expected: '+cosine[i]+'. tol: '+tol+'. delta: '+delta+'.' ); - } - } - t.end(); -}); - tape( 'the function computes the sine and cosine (for -256*pi < x < 0)', function test( t ) { var cosine; var delta; @@ -307,8 +271,8 @@ tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) { z = [ 0.0, 0.0 ]; v = sincos( NaN, z, 1, 0 ); t.equal( v, z, 'returns output array' ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); }); @@ -319,8 +283,8 @@ tape( 'the function returns `NaN` if provided `+infinity`', function test( t ) { z = [ 0.0, 0.0 ]; v = sincos( PINF, z, 1, 0 ); t.equal( v, z, 'returns output array' ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); }); @@ -331,8 +295,8 @@ tape( 'the function returns `NaN` if provided `-infinity`', function test( t ) { z = [ 0.0, 0.0 ]; v = sincos( NINF, z, 1, 0 ); t.equal( v, z, 'returns output array' ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/sincos/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/sincos/test/test.main.js index 7fa5ecc0e2b4..87aa8619a837 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincos/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/sincos/test/test.main.js @@ -247,21 +247,21 @@ tape( 'the function computes the sine and cosine (for x >= 2**60 (PI/2))', funct tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) { var v = sincos( NaN ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `NaN` if provided `+infinity`', function test( t ) { var v = sincos( PINF ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns `NaN` if provided `-infinity`', function test( t ) { var v = sincos( NINF ); - t.equal( isnan( v[0] ), true, 'returns NaN' ); - t.equal( isnan( v[1] ), true, 'returns NaN' ); + t.equal( isnan( v[0] ), true, 'returns expected value' ); + t.equal( isnan( v[1] ), true, 'returns expected value' ); t.end(); });