fix: update fft/base/fftpack/rffti for correct twiddle factor placement#13170
fix: update fft/base/fftpack/rffti for correct twiddle factor placement#13170gunjjoshi wants to merge 3 commits into
fft/base/fftpack/rffti for correct twiddle factor placement#13170Conversation
…orrect positions
---
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_pkg_readmes
status: passed
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- 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: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
The failing tests are because |
|
Separate PR. |
fft/base/fftpack/rffti for correct twiddle factor placementfft/base/fftpack/rffti for correct twiddle factor placement
| rffti( N, workspace, 1, 0 ); | ||
|
|
||
| t.strictEqual( workspace[ N ], 0.0, 'returns expected value' ); | ||
| t.strictEqual( workspace[ N-1 ], 0.0, 'returns expected value' ); |
There was a problem hiding this comment.
Is this check even necessary anymore? Wasn't this to confirm the buggy behavior?
There was a problem hiding this comment.
This check is necessary for a slight different reason. The rffti function shouldn't touch the scratch space (index 0 to index N-1)(Ref). So, through this, we are making sure that the scratch space is kept untouched, and the twiddle factors are not written inside the scratch space.
kgryte
left a comment
There was a problem hiding this comment.
This looks good to me, except for some minor test clean-up.
---
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_pkg_readmes
status: na
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- 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: passed
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves stdlib-js/metr-issue-tracker#961.
Description
This pull request:
fft/base/fftpack/rfftito write twiddle factors starting from indexN, instead ofN+1.fft/base/fftpack/rfftito fix twiddle factor indices metr-issue-tracker#961 (comment).Related Issues
This pull request has the following related issues:
fft/base/fftpack/rfftito fix twiddle factor indices metr-issue-tracker#961.Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Used
gpt-5.4-minito review changes and to test FFTPACK's C implementation.@stdlib-js/reviewers