test: migrate stats/base/dists/levy/logpdf to ULP-based assertions - #14393
Merged
Conversation
Replaces the relative-tolerance delta/tol checks in the fixture-based value tests with `isAlmostSameValue` at the minimum required ULP bound (0, i.e. exact match, for all three fixture sets).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Aug 19, 2026
kgryte
reviewed
Aug 19, 2026
kgryte
reviewed
Aug 19, 2026
kgryte
reviewed
Aug 19, 2026
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
reviewed
Aug 19, 2026
kgryte
reviewed
Aug 19, 2026
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
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.
Resolves a part of #11352.
Description
This pull request:
stats/base/dists/levy/logpdffrom relative-tolerance (delta/tol) comparisons to ULP-based assertions using@stdlib/assert/is-almost-same-value, per the tracking issue [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.test/test.logpdf.js,test/test.factory.js, andtest/test.native.js.positive_mean,negative_mean,large_variance) in every test body, matching the precedent set in already-converted, same-family packages such asstats/base/dists/uniform/logpdf.expected[i] === 0.0 && y < EPSin the JS tests,expected[i] === NINF && y === NINFin the native tests) were left untouched, since they guard against known JS-vs-C divergence at specific fixture points rather than being part of the tolerance idiom being migrated.abs(and, where applicable,EPS) requires were removed accordingly.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
Full fixture suite (
test.js,test.logpdf.js,test.factory.js) run twice at the final ULP bound to confirm determinism; all assertions passed both times.test.native.jsis skipped locally (no built native addon in this environment) but was updated to mirror the same idiom.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code, run as an automated, scheduled task on behalf of the repository maintainer (@Planeshifter) to work through the ULP migration tracking issue (#11352) package by package, following the pattern established by prior merged PRs against this same issue.
@stdlib-js/reviewers
Generated by Claude Code