Repository navigation
Conversation
Replace the computed relative-tolerance check for the corrected sample standard deviation with an ULP-based assertion using `@stdlib/assert/is-almost-same-value`, matching the idiom already used by `stats/incr/mmeanvar`. The accumulator returns a bit-exact result for the tested fixture, so the assertion uses the tightest possible bound of 0 ULP. Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oJTUWCKBJSXet2RvURwjB
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 24, 2026 02: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/incr/mmeanstdevfrom computed relative-tolerance assertions to ULP-based assertions using@stdlib/assert/is-almost-same-value.The package had a single computed-tolerance assertion, covering the corrected sample standard deviation returned when the accumulator is invoked without an input value:
which is now
The
@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires, along with the now-unuseddeltaandtoldeclarations, were removed, as they were only used by the migrated assertion.ULP bound
0The bound was tightened empirically. Starting from a high bound and lowering it, the accumulator's returned standard deviation proved bit-identical to the expected value (
sqrt( 19.0 )) for the tested fixture:0is therefore the measured minimum and the tightest bound expressible. This matches the bound used by the already-migrated sibling packagestats/incr/mmeanvar, whose test is structurally identical (same[ 2.0, 3.0, 10.0 ]dataset and window size).Verification
make test TESTS_FILTER=".*/stats/incr/mmeanstdev/.*"— 424/424 passing, run three times with identical results, confirming the bound is deterministic.eslintwithetc/eslint/.eslintrc.tests.js— clean, zero findings.+2 / -7).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
Opened as a draft for review of the migration idiom before marking ready.
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 migration idiom from the already-converted
stats/incr/mmeanvar, measured the minimum ULP bound empirically, and verified the tests and linting.@stdlib-js/reviewers
Generated by Claude Code