Skip to content

test: migrate stats/incr/mstdev to ULP-based assertions - #15783

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-incr-mstdev
Oct 2, 2026
Merged

kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-incr-mstdev

Conversation

@kgryte

@kgryte kgryte commented Oct 2, 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 stats/incr/mstdev from relative tolerance testing to ULP difference testing, replacing the computed delta/tol comparisons with isAlmostSameValue.
  • uses a ULP bound of 0 for both converted assertions, which is the measured minimum: the accumulated moving corrected sample standard deviations in the fixture set are bit-for-bit equal to the expected values, so no non-zero ULP budget is required. Starting from a bound of 64 and tightening, 0 is the smallest integer for which the full fixture set passes, and the suite was run twice at 0 to confirm determinism.
  • removes the now unused @stdlib/math/base/special/abs and @stdlib/constants/float64/eps requires from the test file.

Only test/test.js is modified; the package has no test/test.native.js. Existing exact comparisons (e.g., the t.deepEqual fixture checks and the t.strictEqual NaN/null checks) are left untouched.

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.

  • Final ULP constant: 0 (measured minimum). The per-assertion ULP distances were measured directly via @stdlib/number/float64/base/ulp-difference as 0 and 0, respectively.
  • make test TESTS_FILTER=".*/stats/incr/mstdev/.*" is green on two consecutive runs, 396/396 assertions passing.
  • make lint-javascript-tests TESTS_FILTER=".*/stats/incr/mstdev/.*" is clean.

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: it selected the package, performed the test migration, measured the minimum ULP bound, and ran the tests and linter.


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. labels Oct 2, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/mstdev $\\color{green}367/367$
$\\color{green}+100.00\\%$
$\\color{green}53/53$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}367/367$
$\\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 2, 2026
@kgryte
kgryte marked this pull request as ready for review October 2, 2026 03:04
@kgryte
kgryte requested a review from a team October 2, 2026 03:04
@kgryte
kgryte merged commit 023e86b into develop Oct 2, 2026
66 checks passed
@kgryte
kgryte deleted the kgryte/ulp-stats-incr-mstdev branch October 2, 2026 03:05
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Oct 2, 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. Statistics Issue or pull request related to statistical functionality. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants