test: migrate stats/incr/nanskewness to ULP-based assertions - #14271
Merged
Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFBgQFAtEnsnHWC53ERcZ3
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/incr/nanskewnessfrom relative-tolerance testing to ULP (units in the last place) difference testing, per the tracking issue.delta/tol(EPS-based) comparisons intest/test.jswith@stdlib/assert/is-almost-same-value. The package has notest/test.native.js, sotest/test.jsis the only changed file.nullexpected value in both test cases. The maximum observed difference was 1 ULP, so both assertions useisAlmostSameValue( actual, expected, 1 ).0ULPs, which fails 6 assertions;1is therefore the tightest bound which passes.expected[ i ] === nullbranch in the accumulator loop is retained as-is, since it asserts the accumulator'snullreturn prior to three data points and is not part of the tolerance idiom being migrated.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 lint-javascript-testsis clean for the changed file. Theeditorconfig-checkerstep could not be executed in the authoring environment, as the package downloads its binary from a GitHub release which was unreachable; the file was instead checked manually against.editorconfig(tab indentation, LF line endings, UTF-8, no trailing whitespace, final newline).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code, following the conventions established in already-merged ULP migration PRs (e.g. #14255, #14252, #14163). The minimum ULP bound was determined empirically by computing actual ULP differences, not guessed.
@stdlib-js/reviewers
Generated by Claude Code