Repository navigation
test: migrate stats/base/dists/arcsine/logcdf to ULP-based assertions - #14180
Merged
Merged
Conversation
Replaces the relative tolerance (`EPS`-scaled) fixture assertions with ULP-based assertions using `@stdlib/assert/is-almost-same-value`. The ULP bounds are the measured minimums which pass over the full fixture set (1000 values per fixture): 18 (small range), 19 (medium range), and 33 (large range). Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3AYP1piEzo99Hn2hKhfPa
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.
Description
This pull request:
stats/base/dists/arcsine/logcdffrom relative tolerance (EPS-scaled) comparisons to ULP-based assertions using@stdlib/assert/is-almost-same-value, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.Affected files:
test/test.logcdf.jsandtest/test.factory.js. The package has notest/test.native.js, andtest/test.jscontains only exact export assertions and is left unchanged.Each fixture loop of the form
is replaced by
and the now-unused
abs/EPSrequires anddelta/tollocals are removed.ULP bounds. Mirroring the surrounding
stats/base/distsconversions, each fixture group uses its own bound, tightened to the measured minimum that passes over the full fixture set (1000 values per fixture, identical for the main and factory code paths):small_range.json20.0 * EPS * abs( expected[i] )18medium_range.json20.0 * EPS * abs( expected[i] )19large_range.json30.0 * EPS * abs( expected[i] )33These are minimal: decrementing any of the three bounds to
17/18/32fails exactly one assertion in each corresponding group, in bothtest.logcdf.jsandtest.factory.js.Related Issues
This pull request has the following related issues:
math/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352Questions
No.
Other
Verification performed locally on
linux/x64, Node.js v22:test/test.logcdf.js(3011 assertions),test/test.factory.js(3016 assertions), andtest/test.js(3 assertions) all pass. The suite was run twice at the final bounds with identical results, to rule out FMA/arch-dependent flakiness.make eslint-tests TESTS_FILTER=".*/stats/base/dists/arcsine/logcdf/.*"is clean.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code, which performed the test migration, measured the minimum ULP bounds against the fixtures, and ran the test and lint checks.
@stdlib-js/reviewers
Generated by Claude Code