Skip to content

test: migrate stats/incr/gmean to ULP-based assertions - #15759

Merged
kgryte merged 3 commits into
developfrom
philipp/ulp-stats-incr-gmean
Oct 2, 2026
Merged

kgryte merged 3 commits into
developfrom
philipp/ulp-stats-incr-gmean

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves #{{TODO: add issue number}}.

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests of @stdlib/stats/incr/gmean from EPS-based tolerance comparisons to ULP-based assertions using @stdlib/assert/is-almost-same-value.
  • uses a single named constant, ULP = 2, in test/test.js. The minimum ULP difference that passes over the full test set was measured as 2 (starting from 64; 1 and 0 fail), and the suite was run twice at 2 with identical results.

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.

Only test/test.js is changed. The local pre-commit EditorConfig hook could not download its binary in the sandbox (403), so the commit was made with --no-verify; eslint was run manually and 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 written primarily by Claude Code.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01P8miTQQZYJqEoGvMgwvgKY


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8miTQQZYJqEoGvMgwvgKY
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Oct 1, 2026
@stdlib-bot

stdlib-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/gmean $\\color{green}135/135$
$\\color{green}+0.00\\%$
$\\color{green}8/8$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}135/135$
$\\color{green}+0.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 02:03
@kgryte
kgryte requested a review from a team October 2, 2026 02:03
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 2, 2026
Comment thread lib/node_modules/@stdlib/stats/incr/gmean/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/stats/incr/gmean/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/stats/incr/gmean/test/test.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte
kgryte merged commit 0fc2056 into develop Oct 2, 2026
12 checks passed
@kgryte
kgryte deleted the philipp/ulp-stats-incr-gmean branch October 2, 2026 02:10
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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