Skip to content

test: migrate stats/base/dists/frechet/cdf to ULP-based assertions - #15942

Open
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-stats-base-dists-frechet-cdf
Open

Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-stats-base-dists-frechet-cdf

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Ref: #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates stats/base/dists/frechet/cdf tests (test.cdf.js, test.factory.js, test.native.js) from EPS-scaled tolerance checks to ULP-based assertions using @stdlib/assert/is-almost-same-value.
  • uses a named ULP variable in each fixture test, tightened to the measured minimum over the full fixture set: large alpha (large_shape): 1 ULP (was 10*EPS relative); large s (large_scale): 16 ULP (was 10*EPS relative); large alpha and s (both_large): 5950 ULP (was 4100*EPS relative). Results were deterministic across repeated runs; the native addon test (built locally) passes at the same bounds.

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 authored by Claude Code (automated routine), which converted the tests and measured the minimal ULP bounds.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01S8HbpxnDU2cmZZk5k1VXv1


Generated by Claude Code

@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Oct 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/frechet/cdf $\\color{green}324/324$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}324/324$
$\\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 12, 2026
@kgryte
kgryte marked this pull request as ready for review October 12, 2026 00:11
@kgryte
kgryte requested a review from a team October 12, 2026 00:12
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 12, 2026

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ULP value needs to be inlined.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Oct 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Changes Pull request which needs changes before being merged. 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