test: migrate stats/base/dists/frechet/kurtosis to ULP-based assertions - #14394
Merged
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
approved these changes
Aug 19, 2026
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/frechet/kurtosisfrom computed EPS-based tolerances 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.delta/tolfixture comparisons in bothtest/test.jsandtest/test.native.jswitht.strictEqual( isAlmostSameValue( y, expected[ i ], 1782 ), true, 'returns expected value' );.@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.ULP bound:
1782in bothtest/test.jsandtest/test.native.js.The bound was tightened agentically: starting from a high value and lowering it to the minimum integer which still passes over the full fixture set (100 cases in
test/fixtures/julia/data.json). The measured maximum ULP difference across the fixtures is exactly 1782 (worst case:alpha = 8.257982161629817,s = 3.5752261675814747, actual10.571830630166573vs. expected10.571830630163408);N = 1781fails one case, so1782is the tightest bound which passes. The suite was run repeatedly at the final value with identical results (115/115 assertions passing each run), so the bound is not arch/FMA sensitive on this machine. The previous tolerances were1350.0 * EPS * abs( expected )(JS) and1500.0 * EPS * abs( expected )(native), which correspond to roughly the same magnitude.Consistent with the convention in previously converted packages in this family (e.g.
stats/base/dists/frechet/mode), the same ULP bound is used intest.jsandtest.native.js. Note that the native tests are skipped in this environment because the native add-on is not built, so the native bound is inherited from the JavaScript measurement rather than independently measured.Only test files are changed; no implementation or fixture changes.
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
make eslint-tests TESTS_FILTER=".*/stats/base/dists/frechet/kurtosis/.*"passes with 0 errors (the only remaining output is the pre-existingUnknown word: "échet"cspell warning, which is also present on already-migrated files in this family).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, which performed the test migration and measured the minimum passing ULP bound.
@stdlib-js/reviewers
Generated by Claude Code