test: migrate math/base/special/logaddexp to ULP-based testing - #13691
Draft
Planeshifter wants to merge 1 commit into
Draft
test: migrate math/base/special/logaddexp to ULP-based testing#13691Planeshifter wants to merge 1 commit into
math/base/special/logaddexp to ULP-based testing#13691Planeshifter wants to merge 1 commit into
Conversation
Resolves a part of #11352. Migrates the fixture-loop assertions in test.js and test.native.js from relative-tolerance (EPS-based) checks to exact-equality assertions. The JavaScript implementation matches the reference fixture values (1000 cases) exactly (0 ULP difference in every case), so per the precedent established for math/base/special/sqrt (#12764), plain t.strictEqual() is used instead of isAlmostSameValue(), and the now-unused EPS/abs/ delta/tol machinery is removed.
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.jsin@stdlib/math/base/special/logaddexpfrom relative-tolerance (EPS-based) assertions to exact-equality assertions, per the ULP-based testing migration tracked in [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352test/fixtures/python/data.json); the measured maximum ULP difference is 0 for every case (all 1000 assertions match the expected value exactly), so — mirroring the precedent set inmath/base/special/sqrt(test: migratemath/base/special/sqrtto ULP-based testing #12764) — plaint.strictEqual( v, expected[ i ], 'returns expected value' )is used instead ofisAlmostSameValue, and no@stdlib/assert/is-almost-same-valuerequire is addedEPSandabsrequires and thedelta/tolvariable declarationsif/elseshort-circuit branch into a single exact assertionThe full JavaScript test suite (1407 assertions) was run twice to confirm deterministic pass.
test/test.native.jswas updated identically to keep the two suites in lockstep; native (compiled addon) assertions were not exercised in this environment since no native build tooling was available, consistent with how the existing test infrastructure already handles this (opts.skipwhen the addon is absent).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
This PR was written by Claude Code, running as a scheduled/unattended task. It searched the repository for the relative-tolerance test idiom, selected
math/base/special/logaddexp(checked for collisions against existing open/merged ULP-migration PRs first), studied prior-art commits (including thesqrtprecedent for the 0-ULP case), computed the ULP differences against the fixtures, applied the migration, and ran the JavaScript test suite twice to confirm determinism before opening this draft PR.@stdlib-js/reviewers
Generated by Claude Code