Repository navigation
test: migrate math/base/special/ellipj to ULP-based assertions
#15264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kgryte
merged 1 commit into
stdlib-js:develop
from
Devansh-18155:devansh/ulp-ellipj-test
Sep 23, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Devansh-18155 How did you derive these ULP diffs? Given the previous deltas (e.g.,
18*EPS), I am surprised by these large ULP differences.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same comment applies to several other test assertions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kgryte ,Large ULP diffs because the previous test checks difference (
18 * EPS), whileisAlmostSameValuechecks ULP, As an deltas of2.3 * EPSwhich makes approx 4750 ULP.I derived it by checking max ULP diff across dataset and we can keep this limits!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still doesn't seem right. 1 unit of epsilon is roughly equal to 1 ULP, so, again, this large divergence is surprising. Can you provide exact test values demonstrating the large ULP difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kgryte ,
Taken a test case from
medium_positive_modulus.json:The value is small (0.0007), 1 ULP is 1.08e-19. So difference is
2.3 * EPSin terms, it takes 4750 ULPs.1 ULP =1 EPS but, if the numbers are closer to zero the ULP shrinks as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. The tolerances were previously computed incorrectly. They should have been scaled by the expected value.