test: migrate stats/base/dists/logistic/stdev to ULP-based assertions - #14769
Merged
Conversation
Replaces relative tolerance comparisons in the `stats/base/dists/logistic/stdev` test suites with `@stdlib/assert/is-almost-same-value`. The ULP bound was tightened to the minimum passing value of 1 ULP for both the JavaScript and native implementations. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KN6ZJBnoMJ3roWAcp4SsH
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.
Resolves a part of #11352.
Description
This pull request:
stats/base/dists/logistic/stdevfrom relative tolerance testing to ULP difference testing, replacing the computeddelta/tolcomparisons with@stdlib/assert/is-almost-same-value.test/test.jsandtest/test.native.js, removing the now unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.The ULP bound was tightened to the minimum passing value:
test.js11test.native.js11Methodology: starting from a high bound and lowering it,
1is the smallest integer that passes over the full 1000-case Python fixture set for both the JavaScript and native implementations. At0, 149 of the 1000 cases fail in each file, so the bound cannot be tightened further. Per-case ULP distance over the fixtures is identical for both implementations (851 cases exact, 149 cases at 1 ULP). The suite was run twice at the final bound with identical results, confirming the bound is not sensitive to FMA/architecture variation. The native addon was compiled locally so thattest.native.jsgenuinely exercised the C implementation rather than being skipped.Only the two test files are changed; no implementation, fixture, or documentation files were touched.
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 established in the already-merged sibling package
stats/base/dists/logistic/variance.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 selected the package, mirrored the conversion idiom from previously merged sibling packages, measured the minimum ULP bound empirically over the fixture set, and verified tests and linting locally.
@stdlib-js/reviewers
Generated by Claude Code