Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/fft/base/fftpack/sinqi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var cosineTable = workspace.slice( 0, N );
// returns <Float64Array>[ ~0.98, ~0.92, ~0.83, ~0.7, ~0.56, ~0.38, ~0.2, ~0.0 ]

var twiddleFactors = workspace.slice( 2*N, 3*N );
// returns <Float64Array>[ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ]
// returns <Float64Array>[ ~0.707, ~0.707, 0, 0, 0, 0, 0, 0 ]

var factors = workspace.slice( 3*N, ( 3*N ) + 4 );
// returns <Float64Array>[ 8, 2, 2, 4 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ function createBenchmark( N ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
sinqi( N, workspace, 1, 0 );
if ( isnan( workspace[ ( 2*N ) + 1 ] ) ) {
if ( isnan( workspace[ 2*N ] ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnan( workspace[ ( 2*N ) + 1 ] ) ) {
if ( isnan( workspace[ 2*N ] ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
> var cosineTable = workspace.slice( 0, N )
<Float64Array>[ ~0.98, ~0.92, ~0.83, ~0.7, ~0.56, ~0.38, ~0.2, ~0.0 ]
> var twiddleFactors = workspace.slice( 2*N, 3*N )
<Float64Array>[ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ]
<Float64Array>[ ~0.707, ~0.707, 0, 0, 0, 0, 0, 0 ]
> var factors = workspace.slice( 3*N, ( 3*N ) + 4 )
<Float64Array>[ 8, 2, 2, 4 ]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import { Collection } from '@stdlib/types/array';
* // returns <Float64Array>[ ~0.98, ~0.92, ~0.83, ~0.7, ~0.56, ~0.38, ~0.2, ~0.0 ]
*
* var twiddleFactors = workspace.slice( 2*N, 3*N );
* // returns <Float64Array>[ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ]
* // returns <Float64Array>[ ~0.707, ~0.707, 0, 0, 0, 0, 0, 0 ]
*
* var factors = workspace.slice( 3*N, ( 3*N ) + 4 );
* // returns <Float64Array>[ 8, 2, 2, 4 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* // returns <Float64Array>[ ~0.98, ~0.92, ~0.83, ~0.7, ~0.56, ~0.38, ~0.2, ~0.0 ]
*
* var twiddleFactors = workspace.slice( 2*N, 3*N );
* // returns <Float64Array>[ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ]
* // returns <Float64Array>[ ~0.707, ~0.707, 0, 0, 0, 0, 0, 0 ]
*
* var factors = workspace.slice( 3*N, ( 3*N ) + 4 );
* // returns <Float64Array>[ 8, 2, 2, 4 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ var cosqi = require( '@stdlib/fft/base/fftpack/cosqi' );
* // returns <Float64Array>[ ~0.98, ~0.92, ~0.83, ~0.7, ~0.56, ~0.38, ~0.2, ~0.0 ]
*
* var twiddleFactors = workspace.slice( 2*N, 3*N );
* // returns <Float64Array>[ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ]
* // returns <Float64Array>[ ~0.707, ~0.707, 0, 0, 0, 0, 0, 0 ]
*
* var factors = workspace.slice( 3*N, ( 3*N ) + 4 );
* // returns <Float64Array>[ 8, 2, 2, 4 ]
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"lengths":[8,12,9,15,4,4,2,13,3,8],"offsets":[0,8,20,29,44,48,52,54,67,70],"cosines":[0.98078528040323043,0.92387953251128674,0.83146961230254524,0.70710678118654757,0.55557023301960229,0.38268343236508984,0.19509032201612833,6.123233995736766e-17,0.99144486137381038,0.96592582628906831,0.92387953251128674,0.86602540378443871,0.79335334029123528,0.70710678118654757,0.60876142900872066,0.50000000000000011,0.38268343236508984,0.25881904510252096,0.13052619222005171,6.123233995736766e-17,0.98480775301220802,0.93969262078590843,0.86602540378443871,0.76604444311897801,0.64278760968653936,0.50000000000000011,0.34202014332566882,0.17364817766693041,6.123233995736766e-17,0.99452189536827329,0.97814760073380569,0.95105651629515353,0.91354545764260087,0.86602540378443871,0.80901699437494745,0.74314482547739436,0.66913060635885824,0.58778525229247314,0.50000000000000011,0.40673664307580037,0.30901699437494745,0.20791169081775945,0.10452846326765368,6.123233995736766e-17,0.92387953251128674,0.70710678118654757,0.38268343236508984,6.123233995736766e-17,0.92387953251128674,0.70710678118654757,0.38268343236508984,6.123233995736766e-17,0.70710678118654757,6.123233995736766e-17,0.99270887409805397,0.97094181742605201,0.93501624268541483,0.88545602565320991,0.82298386589365646,0.74851074817110119,0.6631226582407953,0.56806474673115581,0.46472317204376862,0.35460488704253579,0.23931566428755782,0.12053668025532323,6.123233995736766e-17,0.86602540378443871,0.50000000000000011,6.123233995736766e-17,0.98078528040323043,0.92387953251128674,0.83146961230254524,0.70710678118654757,0.55557023301960229,0.38268343236508984,0.19509032201612833,6.123233995736766e-17],"twiddles":[0.70710678118654757,0.70710678118654746,0,0,0,0,0,0,0.86602540378443871,0.49999999999999994,0,0.50000000000000011,0.8660254037844386,0,6.123233995736766e-17,1,0,0,0,0,0.76604444311897801,0.64278760968653925,0,0.17364817766693041,0.98480775301220802,0,0,0,0,0.91354545764260087,0.40673664307580015,0.66913060635885824,0.74314482547739424,0,0.66913060635885824,0.74314482547739424,-0.10452846326765333,0.9945218953682734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.70710678118654757,0.70710678118654746,0,0,0,0,0,0]}
{"lengths":[2,2,15,8,8,4,9,6,15,15],"offsets":[0,2,4,19,27,35,39,48,54,69],"cosines":[0.70710678118654757,6.123233995736766e-17,0.70710678118654757,6.123233995736766e-17,0.99452189536827329,0.97814760073380569,0.95105651629515353,0.91354545764260087,0.86602540378443871,0.80901699437494745,0.74314482547739436,0.66913060635885824,0.58778525229247314,0.50000000000000011,0.40673664307580037,0.30901699437494745,0.20791169081775945,0.10452846326765368,6.123233995736766e-17,0.98078528040323043,0.92387953251128674,0.83146961230254524,0.70710678118654757,0.55557023301960229,0.38268343236508984,0.19509032201612833,6.123233995736766e-17,0.98078528040323043,0.92387953251128674,0.83146961230254524,0.70710678118654757,0.55557023301960229,0.38268343236508984,0.19509032201612833,6.123233995736766e-17,0.92387953251128674,0.70710678118654757,0.38268343236508984,6.123233995736766e-17,0.98480775301220802,0.93969262078590843,0.86602540378443871,0.76604444311897801,0.64278760968653936,0.50000000000000011,0.34202014332566882,0.17364817766693041,6.123233995736766e-17,0.96592582628906831,0.86602540378443871,0.70710678118654757,0.50000000000000011,0.25881904510252096,6.123233995736766e-17,0.99452189536827329,0.97814760073380569,0.95105651629515353,0.91354545764260087,0.86602540378443871,0.80901699437494745,0.74314482547739436,0.66913060635885824,0.58778525229247314,0.50000000000000011,0.40673664307580037,0.30901699437494745,0.20791169081775945,0.10452846326765368,6.123233995736766e-17,0.99452189536827329,0.97814760073380569,0.95105651629515353,0.91354545764260087,0.86602540378443871,0.80901699437494745,0.74314482547739436,0.66913060635885824,0.58778525229247314,0.50000000000000011,0.40673664307580037,0.30901699437494745,0.20791169081775945,0.10452846326765368,6.123233995736766e-17],"twiddles":[0,0,0,0,0.91354545764260087,0.40673664307580015,0.66913060635885824,0.74314482547739424,0,0.66913060635885824,0.74314482547739424,-0.10452846326765333,0.9945218953682734,0,0,0,0,0,0,0.70710678118654757,0.70710678118654746,0,0,0,0,0,0,0.70710678118654757,0.70710678118654746,0,0,0,0,0,0,0,0,0,0,0.76604444311897801,0.64278760968653925,0,0.17364817766693041,0.98480775301220802,0,0,0,0,0.50000000000000011,0.8660254037844386,0,0,0,0,0.91354545764260087,0.40673664307580015,0.66913060635885824,0.74314482547739424,0,0.66913060635885824,0.74314482547739424,-0.10452846326765333,0.9945218953682734,0,0,0,0,0,0,0.91354545764260087,0.40673664307580015,0.66913060635885824,0.74314482547739424,0,0.66913060635885824,0.74314482547739424,-0.10452846326765333,0.9945218953682734,0,0,0,0,0,0]}
22 changes: 11 additions & 11 deletions lib/node_modules/@stdlib/fft/base/fftpack/sinqi/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ tape( 'the function correctly initializes twiddle factors (small sequence length
workspace = new Float64Array( ( 3*N ) + 34 );
sinqi( N, workspace, 1, 0 );

t.strictEqual( workspace[ N ], 0.0, 'returns expected value' );
for ( i = 0; i < N-1; i++ ) {
y = workspace[ (2*N) + i + 1 ];
t.strictEqual( workspace[ (2*N) - 1 ], 0.0, 'returns expected value' );
for ( i = 0; i < N; i++ ) {
y = workspace[ (2*N) + i ];
e = expected[ off+i ];
t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e );
}
Expand Down Expand Up @@ -185,9 +185,9 @@ tape( 'the function correctly initializes twiddle factors (medium sequence lengt
workspace = new Float64Array( ( 3*N ) + 34 );
sinqi( N, workspace, 1, 0 );

t.strictEqual( workspace[ N ], 0.0, 'returns expected value' );
for ( i = 0; i < N-1; i++ ) {
y = workspace[ (2*N) + i + 1 ];
t.strictEqual( workspace[ (2*N) - 1 ], 0.0, 'returns expected value' );
for ( i = 0; i < N; i++ ) {
y = workspace[ (2*N) + i ];
e = expected[ off+i ];
t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e );
}
Expand Down Expand Up @@ -253,9 +253,9 @@ tape( 'the function correctly initializes twiddle factors (large sequence length
workspace = new Float64Array( ( 3*N ) + 34 );
sinqi( N, workspace, 1, 0 );

t.strictEqual( workspace[ N ], 0.0, 'returns expected value' );
for ( i = 0; i < N-1; i++ ) {
y = workspace[ (2*N) + i + 1 ];
t.strictEqual( workspace[ (2*N) - 1 ], 0.0, 'returns expected value' );
for ( i = 0; i < N; i++ ) {
y = workspace[ (2*N) + i ];
e = expected[ off+i ];
t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e );
}
Expand Down Expand Up @@ -307,8 +307,8 @@ tape( 'the function correctly handles stride and offset parameters', function te
expected = new Float64Array( ( 3*N ) + 34 );
sinqi( N, expected, 1, 0 );

for ( i = 0; i < N-1; i++ ) {
t.strictEqual( workspace[ offset + ( ( (2*N)+i+1 ) * stride ) ], expected[ (2*N)+i+1 ], 'returns expected value' );
for ( i = 0; i < N; i++ ) {
t.strictEqual( workspace[ offset + ( ( (2*N)+i ) * stride ) ], expected[ (2*N)+i ], 'returns expected value' );
}
t.end();
});