Skip to content

test(@stdlib/fft/base/fftpack/float32/sinqi): fix factorization reads - #16292

Draft
Planeshifter wants to merge 1 commit into
developfrom
claude/elegant-feynman-28pwo4
Draft

Planeshifter wants to merge 1 commit into
developfrom
claude/elegant-feynman-28pwo4

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

Symptom: four assertions fail (e.g., expected 8, actual 1.1210387714598537e-44).

Root cause: rffti1 stores the integer factorization data through a Uint32Array view over the Float32Array workspace. The test read those slots as floats, which yields denormals. The test now reads the section through a Uint32Array view, as the cosqi and rffti tests do.

Validation: the test file passes locally (12024 passing, 0 failing; 4 failing before the change). Three independent reviews approved; the one style note (max-len pragma) is addressed.

Related Issues

Does this pull request have any related issues?

None.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Reviewer notes: the sinqi README, lib/main.js, lib/index.js, docs/types/index.d.ts, docs/repl.txt, and examples/index.js have the same mistake (factors shown as <Float32Array>[ 8, 2, 2, 4 ] / read as floats). cosqi already uses the Uint32Array form. Left out of this PR to keep it to the failing test; follow-up.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was produced by Claude Code running as an automated CI-triage routine: it diagnosed the failing job from the workflow logs, authored the fix, and had it reviewed by separate AI reviewers. No human has reviewed it yet.


@stdlib-js/reviewers


Generated by Claude Code

The scheduled `linux_test` workflow failed on develop with four
assertion failures in the "stride and offset" test of
`fft/base/fftpack/float32/sinqi` (e.g., expected `8`, actual
`1.1210387714598537e-44`).

Root cause: `rffti1` stores the integer factorization data (sequence
length, number of factors, and factors) through a `Uint32Array` view
over the `Float32Array` workspace, so reading those slots as floats
yields denormals. This commit reads the factorization section through
a `Uint32Array` view, consistent with the `cosqi` and `rffti` tests.

Ref: https://github.com/stdlib-js/stdlib/actions/runs/39753951313

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CrVhRwPsPFuqS8JdR5SEeJ
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
fft/base/fftpack/float32/sinqi $\\color{green}222/222$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}222/222$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants