Repository navigation
test: migrate stats/base/dists/invgamma/quantile to ULP-based assertions - #16004
Merged
Merged
Conversation
…tions Replace relative tolerance comparisons with `isAlmostSameValue` ULP difference assertions in the test files for `stats/base/dists/invgamma/quantile`. The ULP bounds were tightened to the measured maximum ULP difference over each full Julia fixture set: - `both_large`: 23 ULP - `large_shape`: 23 ULP - `large_rate`: 81 ULP The same bounds apply to `test.quantile.js`, `test.factory.js`, and `test.native.js`, as the JavaScript and C implementations return identical values over the fixtures. Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178NSaBaYh9jgGhodJYmXeu
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
October 11, 2026 12:43
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/invgamma/quantilefrom relative tolerance (EPS-scaleddelta <= tol) assertions to ULP-based assertions using@stdlib/assert/is-almost-same-value.The conversion covers all three test files containing relative tolerance comparisons:
test/test.quantile.jstest/test.factory.jstest/test.native.jsEach ULP bound was tightened to the measured maximum ULP difference over the full Julia fixture set (1000 cases per fixture), so each bound is the minimum integer which still passes:
both_large.json200.0 * EPS * abs()2323large_shape.json100.0 * EPS * abs()2323large_rate.json50.0 * EPS * abs()8181The same bounds apply to the JavaScript, factory, and native test files, as the JavaScript and C implementations return bit-identical values over these fixtures.
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 notes:
22/80) produces 4 failing assertions in each of the three test files.test.js3/3,test.quantile.js3019/3019,test.factory.js3022/3022,test.native.js3021/3021; 0 failures), confirming the bounds are deterministic and not sensitive to FMA/arch variation.test/test.native.jsran for real rather than being skipped.etc/eslint/.eslintrc.tests.js.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. It studied the idiom established in previously merged conversions (e.g. #15783, #15801, #15813), applied the mechanical test conversion, measured the per-fixture maximum ULP differences directly, and verified minimality and determinism as described above.
@stdlib-js/reviewers
Generated by Claude Code