Repository navigation
Conversation
Migrate the `blas/base/srot` test assertions from relative tolerance comparisons to ULP difference comparisons using `@stdlib/number/float32/base/assert/is-almost-same-value`. Each test uses the minimum required ULP bound. Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FutYn9SmHmWj5JVPSphjTx
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
commented
Oct 14, 2026
kgryte
left a comment
Member
Author
There was a problem hiding this comment.
The ULP values need to be inlined.
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:
blas/base/srotfrom relative tolerance testing to ULP difference testing, replacing the computeddelta/tolcomparisons in the privateisApproxhelper with@stdlib/number/float32/base/assert/is-almost-same-value(the single-precision variant, matching the already migratedblas/base/srotmandblas/base/csrot).ULPconstant per test, following the idiom established inblas/base/drotandblas/base/srotm.Files changed (tests only):
test/test.srot.jstest/test.srot.native.jstest/test.ndarray.jstest/test.ndarray.native.jsMeasured ULP bounds
Each bound was tightened to the minimum integer that still passes over the full set of expected values in the corresponding test. Minimality was verified mechanically: decrementing any of the bounds below by one produces test failures.
test/test.srot.jsandtest/test.srot.native.js(in test order):xstridetest/test.ndarray.jsandtest/test.ndarray.native.js(in test order):xstridexoffsetystrideyoffsetTests which already performed exact comparisons (
t.deepEqual/t.strictEqualon exactly representable values) were left untouched.Related Issues
This pull request has the following related issues:
math/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352Questions
The native add-on could not be compiled in the environment used to author this change (no
gfortranavailable), sotest/test.srot.native.jsandtest/test.ndarray.native.jswere skipped locally and their ULP bounds mirror the JavaScript bounds. This matches the already migratedblas/base/drotandblas/base/srotm, where the JavaScript and native bounds are identical and the test bodies/expected values are the same; a reviewer with add-ons built may want to confirm.Other
make test TESTS_FILTER=".*/blas/base/srot/.*"is green (326 + 360 + 5 assertions passing; native tests skipped as above). The suite was run twice at the final ULP values to confirm determinism.make eslint-tests TESTS_FILTER=".*/blas/base/srot/.*"is clean.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code. The ULP bounds were measured programmatically (per-element minimum required ULP difference, maximized over each test) rather than guessed, and each bound was verified to be minimal by confirming that one less ULP fails.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_01FutYn9SmHmWj5JVPSphjTx
Generated by Claude Code