test: migrate stats/base/dists/hypergeometric/stdev to ULP-based assertions - #14843
Draft
kgryte wants to merge 1 commit into
Draft
test: migrate stats/base/dists/hypergeometric/stdev to ULP-based assertions#14843kgryte wants to merge 1 commit into
stats/base/dists/hypergeometric/stdev to ULP-based assertions#14843kgryte wants to merge 1 commit into
Conversation
…sertions Ref: #11352 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7AExAGAeNN4gnd4Ukbw6k
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves a part of #11352.
Description
This pull request:
stats/base/dists/hypergeometric/stdevfrom relative tolerance testing (delta <= EPS * abs( expected )) to ULP difference testing using@stdlib/assert/is-almost-same-value.The following files are updated:
test/test.js: ULP bound of 2.test/test.native.js: ULP bound of 1.Each bound is the measured minimum over the full 100-case Julia fixture set (
test/fixtures/julia/data.json); loweringtest/test.jsto1yields 4 failures, and loweringtest/test.native.jsto0yields 19 failures. The test suite was run twice at the final bounds to confirm the results are deterministic, and the native add-on was additionally compiled withCFLAGS="-ffp-contract=off"to confirm the C bound is not sensitive to FMA contraction.Only the two test files are changed; no implementation, documentation, or fixture files are touched.
Related Issues
This pull request has the following related issues:
math/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352Questions
The JavaScript and C implementations require different bounds (2 vs. 1) for the same fixtures. Per the FAQ, the bounds are reported as measured rather than unified. Happy to use a single bound of
2in both files if that is preferred.Other
Verification performed locally:
The native add-on was built locally so that
test/test.native.jsactually executed rather than being skipped.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running as an unattended scheduled task. The agent studied previously merged conversions under this tracking issue to match the established idiom, applied the migration, and determined the minimum ULP bounds empirically by bisecting on the fixture set and re-running the suite.
@stdlib-js/reviewers
Generated by Claude Code