test: migrate math/base/special/asecf to ULP-based testing - #14062
Merged
kgryte merged 1 commit intoAug 8, 2026
Conversation
math/base/special/asecf to ULP-based testing
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Aug 8, 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:
math/base/special/asecffrom computed relative tolerance (EPS-scaleddelta <= tol) checks to ULP-based assertions;@stdlib/constants/float32/epsand@stdlib/math/base/special/absrequires with@stdlib/number/float32/base/assert/is-almost-same-value.test/test.jsandtest/test.native.jsare modified to use the new ULP assertions.ULP bounds (one per fixture set, each tightened to the measured minimum):
medium_negative2.0 * EPS3medium_positive68.0 * EPS97large_positive1.0 * EPS1large_negative1.0 * EPS1larger_positive1.0 * EPS0larger_negative1.0 * EPS1huge_negative1.0 * EPS0huge_positive1.0 * EPS0Each bound is the smallest non-negative integer for which every fixture in the corresponding set passes. Starting from a high bound and lowering, the suite passes at the values above (4013/4013 assertions), and decrementing each of the five non-zero bounds by one produces exactly five failures - one per set ; confirming that no bound can be tightened further. The
larger_positive,huge_negative, andhuge_positivesets match the reference values exactly, hence a bound of0.The suite was run twice at the final bounds with identical results, so the bounds are not sensitive to FMA/contraction differences on this machine.
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
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers