Skip to content

Commit 22079b1

Browse files
committed
refactor: update variables and docs
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c7aea44 commit 22079b1

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

lib/node_modules/@stdlib/fft/base/fftpack/lib/cfftb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ var cfftb1 = require( './cfftb1.js' );
9797
* where `i = sqrt(-1)`.
9898
*
9999
* @param {NonNegativeInteger} N - length of the sequence to transform
100-
* @param {Float64Array} c - input array containing the sequence to be transformed
100+
* @param {Float64Array} c - real-valued input array containing interleaved real and imaginary components corresponding to the sequence to be transformed
101101
* @param {NonNegativeInteger} offsetC - starting index for `c`
102-
* @param {Float64Array} wsave - workspace array containing pre-computed values
102+
* @param {Float64Array} wsave - real-valued workspace array containing pre-computed values
103103
* @param {NonNegativeInteger} offsetW - starting index for `wsave`
104104
* @returns {void}
105105
*

lib/node_modules/@stdlib/fft/base/fftpack/lib/cfftb1.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
// MODULES //
6464

65+
var floor = require( '@stdlib/math/base/special/floor' );
6566
var passb4 = require( './passb4.js' );
6667
var passb2 = require( './passb2.js' );
6768
var passb3 = require( './passb3.js' );
@@ -75,18 +76,18 @@ var passfb = require( './passfb.js' );
7576
* Performs the backward complex Fourier transform (i.e., the Fourier synthesis).
7677
*
7778
* @private
78-
* @param {number} n - length of the sequence to transform
79-
* @param {Float64Array} c - input array containing sequence to be transformed
80-
* @param {NonNegativeInteger} cOffset - starting index for input array
81-
* @param {Float64Array} ch - working array for intermediate results
82-
* @param {NonNegativeInteger} chOffset - starting index for working array
83-
* @param {Float64Array} wa - array of twiddle factors
84-
* @param {NonNegativeInteger} waOffset - starting index for twiddle factors array
85-
* @param {Int32Array} ifac - array containing factorization information
86-
* @param {NonNegativeInteger} ifacOffset - starting index for factorization array
79+
* @param {number} N - length of the sequence to transform
80+
* @param {Float64Array} c - real-valued input array containing interleaved real and imaginary components corresponding to the sequence to be transformed
81+
* @param {NonNegativeInteger} cOffset - starting index for `c`
82+
* @param {Float64Array} ch - workspace array for storing intermediate results
83+
* @param {NonNegativeInteger} chOffset - starting index for `ch`
84+
* @param {Float64Array} wa - workspace array for storing twiddle factors
85+
* @param {NonNegativeInteger} waOffset - starting index for `wa`
86+
* @param {Int32Array} ifac - workspace array for storing factorization information
87+
* @param {NonNegativeInteger} ifacOffset - starting index for `ifac`
8788
* @returns {void}
8889
*/
89-
function cfftb1( n, c, cOffset, ch, chOffset, wa, waOffset, ifac, ifacOffset ) {
90+
function cfftb1( N, c, cOffset, ch, chOffset, wa, waOffset, ifac, ifacOffset ) {
9091
var idl1;
9192
var idot;
9293
var ix2;
@@ -110,7 +111,7 @@ function cfftb1( n, c, cOffset, ch, chOffset, wa, waOffset, ifac, ifacOffset ) {
110111
for ( k1 = 1; k1 <= nf; k1++ ) {
111112
ip = ifac[ ifacOffset+k1+1 ];
112113
l2 = ip * l1;
113-
ido = n / l2;
114+
ido = floor( N / l2 );
114115
idot = ido + ido;
115116
idl1 = idot * l1;
116117
switch ( ip ) {
@@ -148,12 +149,13 @@ function cfftb1( n, c, cOffset, ch, chOffset, wa, waOffset, ifac, ifacOffset ) {
148149
break;
149150
}
150151
l1 = l2;
151-
iw += ( ip - 1 ) * idot;
152+
iw += ( ip-1 ) * idot;
152153
}
153154
if ( na === 0 ) {
154155
return;
155156
}
156-
for ( i = 0; i < n*2; i++ ) {
157+
// Now that we've finished computing the transforms, copy over the final results to the input array...
158+
for ( i = 0; i < N*2; i++ ) {
157159
c[ i+cOffset ] = ch[ i+chOffset ];
158160
}
159161
}

0 commit comments

Comments
 (0)