Skip to content

test: migrate stats/incr/mcovariance to ULP-based assertions - #16168

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-stats-incr-mcovariance
Oct 15, 2026
Merged

kgryte merged 1 commit into
developfrom
philipp/ulp-stats-incr-mcovariance

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates stats/incr/mcovariance tests (test/test.js) from EPS/tolerance-based comparisons to ULP-based assertions using @stdlib/assert/is-almost-same-value, with the ULP count passed inline as an integer literal.
  • fixes the PRNG seed for the generated datasets (123456 instead of randu.seed) so results are deterministic, and removes now-unused tol/EPS/abs declarations.

Final inline ULP values (measured minimum that passes; suite run twice for determinism):

Test ULP
moving unbiased sample covariance (unknown means), generated datasets 8192
moving unbiased sample covariance (known means), generated datasets 1674
current covariance when no input provided (unknown means) 2
current covariance when no input provided (known means) 0

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.

No.

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 written by Claude Code as an automated routine; ULP bounds were found by automated search against the test suite. Local editorconfig pre-commit lint could not run in the sandbox (binary download blocked), so hooks were skipped.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01H8Yr438fA51j9Ws7c4pC47


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8Yr438fA51j9Ws7c4pC47
@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 15, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/mcovariance $\\color{green}457/457$
$\\color{green}+100.00\\%$
$\\color{green}61/61$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}457/457$
$\\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 15, 2026
@kgryte
kgryte marked this pull request as ready for review October 15, 2026 11:52
@kgryte
kgryte requested a review from a team October 15, 2026 11:52
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 15, 2026
@kgryte
kgryte merged commit faaaca7 into develop Oct 15, 2026
82 checks passed
@kgryte
kgryte deleted the philipp/ulp-stats-incr-mcovariance branch October 15, 2026 11:53
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 15, 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.

4 participants