test: migrate math/base/special/tanh to ULP-based testing#13652
Merged
Conversation
Contributor
Coverage ReportNo coverage information available. |
kgryte
approved these changes
Jul 25, 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/tanhtest cases from relative-tolerance-based assertions (EPS/abs/tolidiom) to ULP-based assertions using@stdlib/assert/is-almost-same-valuein bothtest/test.jsandtest/test.native.js.2for the main fixture dataset (fixtures/julia/data.json), which is the smallest integer value for which the full fixture set passes (verified:N=1fails on 4 of 2003 cases;N=2passes all).tiny_negative,tiny_positive,large_negative, andlarge_positivefixture sets are exact matches (0 ULP difference), so those loops use plaint.strictEqual( y, expected[ i ], 'returns expected value' ), matching the convention used in prior conversions (e.g.math/base/special/coth).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
Final ULP constant:
2(main dataset only; other fixture sets are exact).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, which studied issue #11352 and the prior converted packages (
math/base/special/coth,math/base/special/atanh) to mirror the established idiom, then measured the minimum ULP bound agentically by running the test suite against candidate bounds.@stdlib-js/reviewers
Generated by Claude Code