File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/fft/base/fftpack/rffti Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,28 +114,23 @@ The function accepts the following arguments:
114114var Float64Array = require( '@stdlib/array/float64' );
115115var rffti = require( '@stdlib/fft/base/fftpack/rffti' );
116116
117- var workspace;
118- var N;
119- var nf;
120- var i;
121- var j;
122-
123- N = 8;
124- workspace = new Float64Array( ( 2*N ) + 34 );
117+ var N = 8;
118+ var workspace = new Float64Array( ( 2*N ) + 34 );
125119
126120rffti( N, workspace, 1, 0 );
127121
128122console.log( 'Sequence length: %d', N );
129123console.log( 'Twiddle factors:' );
124+ var i;
130125for ( i = N; i < 2*N; i++ ) {
131126 console.log( ' workspace[%d] = %d', i, workspace[ i ] );
132127}
133128
134129console.log( 'Factorization:' );
135- nf = workspace[ ( 2*N ) + 1 ];
130+ var nf = workspace[ ( 2*N ) + 1 ];
136131console.log( ' number of factors: %d', nf );
137- for ( j = 0; j < nf; j ++ ) {
138- console.log( ' factor[%d]: %d', j , workspace[ ( 2*N ) + 2 + j ] );
132+ for ( i = 0; i < nf; i ++ ) {
133+ console.log( ' factor[%d]: %d', i , workspace[ ( 2*N ) + 2 + i ] );
139134}
140135```
141136
You can’t perform that action at this time.
0 commit comments