Skip to content

test: migrate stats/base/dists/hypergeometric/skewness to ULP-based assertions - #15046

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-base-dists-hypergeometric-skewness
Sep 7, 2026
Merged

kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-base-dists-hypergeometric-skewness

Conversation

@kgryte

@kgryte kgryte commented Sep 6, 2026

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

Only the two test files are changed; no source, fixture, or package metadata was touched.

ULP bound

The final ULP constant is 1 for both test/test.js and test/test.native.js, and this is the measured minimum:

  • Over the full 100-value Julia fixture set (test/fixtures/julia/data.json), 66 values are bit-for-bit exact and the remaining 34 differ by exactly 1 ULP. The maximum observed ULP difference is therefore 1, for both the JavaScript and the native (C addon) implementations.
  • Tightening to 0 fails 34 of the 120 assertions in test/test.js, confirming 1 is the minimum bound which passes.
  • The suite was run twice at the final bound with the native addon built locally; both runs were green and identical (test.js: 120/120, test.native.js: 108/108), so there is no FMA/arch-dependent flakiness at this bound.

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.

Opened as a draft.

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 as part of an automated, unattended run over #11352. The ULP bound was measured empirically against the fixture set rather than guessed.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_0132ozAreeH8GYagxGFNNVvX


Generated by Claude Code

… assertions

Replaces relative tolerance assertions with ULP difference assertions
using `@stdlib/assert/is-almost-same-value`. The maximum observed ULP
difference over the fixture set is 1 for both the JavaScript and native
implementations, so 1 is the minimum bound which passes.

Ref: #11352

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

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/hypergeometric/skewness $\\color{green}203/203$
$\\color{green}+100.00\\%$
$\\color{green}13/13$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}203/203$
$\\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 7, 2026
@kgryte
kgryte marked this pull request as ready for review September 7, 2026 09:59
@kgryte
kgryte requested a review from a team September 7, 2026 09:59
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 7, 2026
@kgryte
kgryte merged commit 8c544a1 into develop Sep 7, 2026
82 checks passed
@kgryte
kgryte deleted the kgryte/ulp-stats-base-dists-hypergeometric-skewness branch September 7, 2026 10:00
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 7, 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