test: migrate math/base/special/cflipsignf to ULP-based assertions - #14414
Merged
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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:
test/test.jsandtest/test.native.jsofmath/base/special/cflipsignffrom relative-tolerance (EPS-based) assertions to ULP-difference assertions via@stdlib/number/float32/base/assert/is-almost-same-value, following the precedent of previously merged single-precision complex packages (e.g.,math/base/special/csignumf,math/base/special/cinvf).delta/tolcomputations, along with the now unusedabsfandEPSrequires, and replaces the exact/tolerance branch in the fixture loop witht.strictEqual( isAlmostSameValue( ..., 1 ), true, 'returns expected value' )for the real and imaginary components.1for both the JavaScript and native implementations. The value was measured by computing, for every fixture pair intest/fixtures/julia/data.json(2003 cases; 4006 component assertions), the smallest ULP argument for whichisAlmostSameValuereturnstrue, and taking the maximum. The measured minimum is1; at0, 4000 of the 4006 component assertions fail (withmaxULP = 0, the assertion reduces to exactSameValueequality against the double-precision fixture values), so1cannot be tightened further.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 install-node-addons NODE_ADDONS_PATTERN=math/base/special/cflipsignf) so thattest/test.native.jswas actually exercised rather than skipped, and the native implementation was independently confirmed to require the same minimum of1ULP.make test TESTS_FILTER=".*/math/base/special/cflipsignf/.*"was run twice at the final ULP value to confirm determinism: 4038/4038 assertions passing intest/test.jsand 4038/4038 intest/test.native.json both runs.etc/eslint/.eslintrc.tests.js).NaN) were exact comparisons already and are left untouched.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was authored by an automated Claude Code agent running as a scheduled task, mirroring the conventions established in prior merged ULP-migration pull requests for #11352.
@stdlib-js/reviewers
Generated by Claude Code