Repository navigation
test: migrate math/base/special/atandf to ULP-based assertions - #14699
Merged
Merged
Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PjcKKsBf83rPdZ62AbLwxx
kgryte
marked this pull request as ready for review
August 27, 2026 06:34
Contributor
Coverage ReportNo coverage information available. |
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:
math/base/special/atandffrom relative tolerance testing (delta <= EPS * absf( expected )) to ULP difference testing via@stdlib/number/float32/base/assert/is-almost-same-value.test/test.jsandtest/test.native.js, removing theabsfand@stdlib/constants/float32/epsimports along with thedelta/tolbookkeeping, and replacing thet.ok( delta <= tol, ... )assertions witht.strictEqual( isAlmostSameValuef( y, e, 1 ), true, 'returns expected value' );.The ULP bound was tightened to the measured minimum:
test/test.jsjulia/negative.json(2003 values)1test/test.jsjulia/positive.json(2003 values)1test/test.native.jsjulia/negative.json(2003 values)1test/test.native.jsjulia/positive.json(2003 values)11is the minimum: at0ULP, 970 of the 2003 values in each fixture set fail (for both the JavaScript and the C implementation), and at1ULP none fail.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 test TESTS_FILTER=".*/math/base/special/atandf/.*"passes: 4009/4009 assertions fortest/test.jsand 4009/4009 fortest/test.native.js. The native add-on was built locally (make install-node-addons NODE_ADDONS_PATTERN="atandf") so thattest/test.native.jswas actually exercised rather than skipped, and the suite was run twice at the final ULP value to confirm determinism.etc/eslint/.eslintrc.tests.js.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code, following the migration pattern established in previously merged conversions (e.g.,
math/base/special/logitf), with the ULP bound measured empirically against the full fixture set.@stdlib-js/reviewers
Generated by Claude Code