Skip to content

test: migrate stats/base/dists/frechet/entropy to ULP-based assertions - #14406

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-frechet-entropy
Draft

test: migrate stats/base/dists/frechet/entropy to ULP-based assertions#14406
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-frechet-entropy

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates stats/base/dists/frechet/entropy test fixtures from the old computed EPS-based tolerance idiom (delta/tol/abs( delta ) <= tol) to ULP-based assertions using @stdlib/assert/is-almost-same-value, per [RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352.
  • applies the change to both test/test.js and test/test.native.js.
  • the minimum ULP bound was determined empirically by running both the JavaScript and native (compiled C add-on) implementations against the full fixture set: both implementations return bit-exact matches for every fixture value, so the tightest passing bound is 0 ULPs. Verified deterministic by running each suite twice.

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.

  • Read, understood, and followed the [contributing guidelines][contributing].

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 generated by an automated Claude Code routine that discovers packages still using the old EPS-tolerance test idiom, converts them to isAlmostSameValue-based ULP assertions mirroring prior art from already-merged conversions in the same package family, and empirically determines the tightest passing ULP bound.


@stdlib-js/reviewers


Generated by Claude Code

Replaces the computed EPS-based tolerance checks in the fixture test
with `isAlmostSameValue`, mirroring the approach used for other
already-migrated packages in the same distribution family.

Ref: #11352

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: skipped
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@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 Aug 19, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/frechet/entropy $\\color{green}181/181$
$\\color{green}+100.00\\%$
$\\color{green}11/11$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}181/181$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue)

3 participants