Conversation
Migrate the relative tolerance assertions in `stats/incr/prod` tests to ULP-based assertions using `@stdlib/assert/is-almost-same-value`. Both converted assertions were tightened to a measured minimum of 1 ULP. Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsMJkqn6MeCqGA4HCRiJEe
|
Hello! 👋 We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm! Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks. Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀 For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
Resolves a part of #11352.
Description
This pull request:
stats/incr/prodfrom relative tolerance testing to ULP difference testing, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.Specifically, this pull request replaces the
delta/tolcomputations in the twot.strictEqual( delta <= tol, ... )assertions (the "overflow may be transient" and "underflow may be transient" tests) withisAlmostSameValue( actual, expected, 1 ), adds the@stdlib/assert/is-almost-same-valuerequire, and removes the now unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.Final ULP constant:
1for both assertions.Both assertion sites were tightened to their measured minimum:
1.0715086071862673e+2991.0715086071862675e+2999.332636185032189e-3049.33263618503219e-304The minimum was measured by evaluating
isAlmostSameValueover increasing ULP values and taking the smallest passing integer. Tightness was confirmed by re-running the suite at0, which fails both assertions (# pass 3425 / # fail 2), while1passes all3427assertions. The suite was run twice at the final ULP value, with identical results both times, to confirm determinism.Only
test/test.jsis modified. The package has notest.native.js.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
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated pass over the
#11352migration. The conversion mirrors the idiom established in previously mergedstats/incrconversions (e.g. #15257, #15283). The ULP bounds were measured empirically rather than guessed, and verified to be minimal.@stdlib-js/reviewers
Generated by Claude Code