Skip to content

test: migrate simulate/iter/lanczos-pulse to ULP-based assertions - #15931

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-lanczos-pulse
Oct 12, 2026
Merged

kgryte merged 1 commit into
developfrom
kgryte/ulp-lanczos-pulse

Conversation

@kgryte

@kgryte kgryte commented Oct 6, 2026

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests for simulate/iter/lanczos-pulse from relative tolerance (EPS-scaled) comparisons to ULP-based assertions using @stdlib/assert/is-almost-same-value.
  • replaces each if ( actual.value === expected[ i ].value ) { ... } else { delta/tol ... } block (9 occurrences in test/test.js) with t.strictEqual( isAlmostSameValue( actual.value, expected[ i ].value, 0 ), true, 'returns expected value' );.
  • drops the now unused @stdlib/math/base/special/abs and @stdlib/constants/float64/eps requires, along with the associated delta and tol declarations.

Final ULP constant: 0.

The bound was tightened agentically: starting from 64, the ULP value was lowered until the minimum integer which still passes over the full fixture set was found. All generated waveform values match the expected values exactly, so 0 ULP is the measured minimum (the same bound the sibling package simulate/iter/periodic-sinc settled on in #15819). The suite was run twice at the final value to confirm determinism (3281 assertions passing on both runs, no FMA/arch-dependent variation).

The package has no test/test.native.js; test/test.validate.js contains no tolerance comparisons and is therefore unchanged. Only test/test.js is modified.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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.

Verification performed locally:

  • make test TESTS_FILTER=".*/simulate/iter/lanczos-pulse/.*" → 3281 passing, 0 failing.
  • ESLint against etc/eslint/.eslintrc.tests.js → 0 errors, 0 warnings.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of 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 authored by Claude Code running as an unattended scheduled task, following the migration recipe in #11352 and mirroring the idiom established by previously merged conversions in the same package family.


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Oct 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
simulate/iter/lanczos-pulse $\\color{green}320/320$
$\\color{green}+100.00\\%$
$\\color{green}43/43$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}320/320$
$\\color{green}+100.00\\%$

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

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Oct 12, 2026
@kgryte
kgryte marked this pull request as ready for review October 12, 2026 00:18
@kgryte
kgryte requested a review from a team October 12, 2026 00:18
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 12, 2026
@kgryte
kgryte merged commit 4eddd51 into develop Oct 12, 2026
66 checks passed
@kgryte
kgryte deleted the kgryte/ulp-lanczos-pulse branch October 12, 2026 00:19
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants