Repository navigation
test: migrate stats/base/dists/gumbel/logpdf to ULP-based assertions - #15727
Merged
Merged
Conversation
Replace relative-tolerance assertions in the `stats/base/dists/gumbel/logpdf` test suite with ULP difference assertions using `@stdlib/assert/is-almost-same-value`. All fixture cases match the Julia reference values exactly, so the minimum required ULP bound is 0 for `test.logpdf.js`, `test.factory.js`, and `test.native.js`. Resolves a part of #11352. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0135QJfR8bGavjhc1uUUPM3g
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 1, 2026 06:39
kgryte
commented
Oct 1, 2026
Signed-off-by: Athan <kgryte@gmail.com>
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/gumbel/logpdftest suite from relative-tolerance assertions to ULP difference assertions, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.delta/tol(EPS * abs( expected[i] )) comparisons intest/test.logpdf.js,test/test.factory.js, andtest/test.native.jswitht.strictEqual( isAlmostSameValue( y, expected[ i ], <ulp> ), true, 'returns expected value' );.@stdlib/assert/is-almost-same-valuerequire and drops the now-unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires (and the associateddelta/toldeclarations).Measured ULP bound:
0in all three test files.The bound was determined by starting high and tightening: every non-
nullfixture case (2994 comparisons per entry point, acrosspositive_mean.json,negative_mean.json, andlarge_variance.json) matches the Julia reference value exactly, for the JavaScript implementation, thefactoryvariant, and the native C implementation.0is therefore the minimum required value, and it is the same fortest.native.jsas for the JavaScript tests.Verification:
make test TESTS_FILTER=".*/stats/base/dists/gumbel/logpdf/.*"is green — 9033 assertions passing acrosstest.js,test.logpdf.js,test.factory.js, andtest.native.js.test/test.native.jsactually executes rather than being skipped.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
The conversion mirrors the idiom already established in sibling packages in the same family (e.g.
stats/base/dists/gumbel/pdf,stats/base/dists/gumbel/cdf), including the placement of theisAlmostSameValuerequire and the'returns expected value'assertion message.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 test migration and the ULP bound measurement were performed by Claude Code, mirroring the idiom of previously merged conversions in the same package family.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_0135QJfR8bGavjhc1uUUPM3g
Generated by Claude Code