Skip to content

test: migrate stats/incr/mrss to ULP-based assertions - #15669

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-incr-mrss
Sep 30, 2026
Merged

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

Conversation

@kgryte

@kgryte kgryte commented Sep 29, 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/mrss from relative tolerance testing to ULP difference testing, replacing the computed delta/tol comparison with isAlmostSameValue.
  • uses a ULP bound of 0, which is the measured minimum: the accumulated moving residual sums of squares in the fixture set are exactly representable, so no non-zero ULP budget is required. Tightening from a higher starting bound, 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/constants/float64/eps and @stdlib/math/base/special/abs requires from the test file.

Only test/test.js is modified; the package has no test/test.native.js.

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; make test TESTS_FILTER=".*/stats/incr/mrss/.*" green on two consecutive runs, 98/98 assertions).
  • make eslint-tests TESTS_FILTER=".*/stats/incr/mrss/.*" 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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was authored by Claude Code: it selected the package, mirrored the conversion idiom from already-migrated packages in the same family, and determined the minimum passing ULP bound by running the package test suite.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01QmWdLdjeUxMBTmv5WheEGs


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmWdLdjeUxMBTmv5WheEGs
@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 Sep 29, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/mrss $\\color{green}144/144$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}144/144$
$\\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 Sep 30, 2026
@kgryte
kgryte marked this pull request as ready for review September 30, 2026 06:05
@kgryte
kgryte requested a review from a team September 30, 2026 06:05
@kgryte
kgryte merged commit 772ab64 into develop Sep 30, 2026
66 checks passed
@kgryte
kgryte deleted the kgryte/ulp-stats-incr-mrss branch September 30, 2026 06:06
@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 Sep 30, 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.

2 participants