Repository navigation
Conversation
Replace relative tolerance assertions with ULP difference assertions using `@stdlib/assert/is-almost-same-value`. Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BdbV1Qs2TjBQbTP1r2EY7a
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:
stats/incr/nanmmsefrom relative tolerance testing to ULP difference testing, as proposed in [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.delta/tolrelative tolerance computation (and its exact-equality fast path) intest/test.jswith a singlet.strictEqual( isAlmostSameValue( actual, expected[ i ], 1 ), true, 'returns expected value' );assertion.@stdlib/assert/is-almost-same-valuerequire and removes the now unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.Notes on the chosen ULP bound:
test/test.js) and no native tests, so one ULP constant covers the entire fixture set.[ 0, 0, 0, 0, 1, 0, 0, 1 ], so the maximum observed difference is1.64: the suite passes at64,2, and1, and fails at0with exactly the two failures corresponding to the two 1-ULP elements.1(24 passing both times) to confirm the result is deterministic on this architecture.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
lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js; no source, documentation, or fixture values were modified.stats/incr/mmseandstats/incr/nanmrmse.test/test.jswithetc/eslint/.eslintrc.tests.jsexits cleanly; the one remainingmax-lenwarning is pre-existing and on an untouched line.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was authored by Claude Code, running unattended as a scheduled task. It studied #11352 and the already-converted sibling packages to match the project's established idiom, measured the per-element ULP differences, and bisected the ULP bound down to the measured minimum.
@stdlib-js/reviewers
Generated by Claude Code