test: migrate math/base/special/acscdf to ULP-based testing - #13673
Merged
Conversation
Replaces the relative-tolerance (EPS-scaled delta/tol) assertions in test/test.js and test/test.native.js with ULP-difference assertions via @stdlib/number/float32/base/assert/is-almost-same-value, following the precedent set by asecdf (single-precision variant, per #11352). Minimum required ULP value is 2 for both the negative and positive fixture blocks, determined by computing the maximum ULP distance between actual and expected values over both fixture sets.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Jul 26, 2026
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.jsinmath/base/special/acscdffrom relative-tolerance (EPS-scaled delta/tol) assertions to ULP-difference assertions via@stdlib/number/float32/base/assert/is-almost-same-value(the single-precision variant, following the precedent ofasecdf, asacscdfis a single-precision function).2) for both the negative and positive fixture test blocks. This was determined empirically:ULP = 1fails (142 of 6009 assertions),ULP = 2passes all 6009 assertions, confirmed deterministic across multiple consecutive runs. A direct computation of the ULP distance between actual and expected values over both fixture sets confirms a max distance of 2 ULPs in each case.absrequire anddelta/tolvariables, and collapses the obsolete exact-equality short-circuit branches. TheEPSrequire is retained, as it is still used by theuniform()domain-guardNaNtests.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
The native add-on could not be built in this sandboxed environment (no
node-gyp/toolchain available), sotest/test.native.jscould not be executed directly; however, it mirrors the same ULP value (2) as the JS test, consistent with prior conversions in this series (e.g.cscd, #13664) that noted the same limitation.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code (test migration and minimum-ULP determination via direct computation of ULP distance over the fixture sets).
@stdlib-js/reviewers
Generated by Claude Code