Repository navigation
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cyvgg19SJhPHVs8HSgjuFp
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This branch has not been deployed
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:
migrates the tests for
stats/incr/nanmrangefrom tolerance-based assertions to ULP-based assertions, replacing the hard-coded absolute tolerance intest/test.jswith
adds the
@stdlib/assert/is-almost-same-valuerequire and drops the now unused@stdlib/math/base/special/absrequire.Final ULP constant:
1. This is the measured minimum. The single inexact assertion compares the accumulator output for the window[3.14, 5.0](i.e.,5.0 - 3.14, which evaluates to1.8599999999999999) against the fixture value1.86, which are1ULP apart. Verified by bisection: the test suite fails at0ULP and passes at1ULP. The suite was run twice at the final value to confirm determinism (no FMA/architecture variance); this test uses fixed, non-random input data.Note that the previous
0.01absolute tolerance was roughly 15 orders of magnitude looser than the actual error, so this change meaningfully tightens the assertion.Only
test/test.jsis modified; no other files are 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
stats/incr/mpcorr, where the converted assertion uses'returns expected value'while the surrounding untouched assertions keep'returns expected value for window '+i.make test TESTS_FILTER=".*/stats/incr/nanmrange/.*"passes (102/102), andmake eslint-tests TESTS_FILTER=".*/stats/incr/nanmrange/.*"is clean.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code, which surveyed the repository for remaining tolerance-based tests, mirrored the idiom used by already-migrated packages, and determined the minimum passing ULP bound by bisection.
@stdlib-js/reviewers
Generated by Claude Code