Repository navigation
test: migrate stats/base/dists/geometric/logpmf to ULP-based assertions - #15543
Merged
Merged
Conversation
…ions Migrates the test suite for `stats/base/dists/geometric/logpmf` from relative tolerance assertions to ULP difference assertions using `@stdlib/assert/is-almost-same-value`. The ULP bounds were tightened to the measured minimum over the full fixture sets: 1 ULP for the small `p` fixtures and 2 ULP for the large `p` fixtures (for both the JavaScript and C implementations). Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qDBdX4stVDGqj5ywZ7uwf
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
September 26, 2026 02:17
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:
stats/base/dists/geometric/logpmffrom relative tolerance assertions (delta <= tol, wheretol = N * EPS * abs( expected )) to ULP difference assertions using@stdlib/assert/is-almost-same-value.test/test.logpmf.js,test/test.factory.js, andtest/test.native.js.test/test.jsis unchanged, as it contains no tolerance-based assertions.@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires from the updated test files.ULP bounds
Each bound was tightened to the measured minimum over the full fixture set (1000 values per fixture):
small_p.json2.0 * EPS * abs( expected )11large_p.json1.5 * EPS * abs( expected )22Notes on how the bounds were determined:
src/main.c(and its transitive C dependencies) into a standalone harness and evaluating the same fixtures. It produces bit-identical results to the JavaScript implementation at-O0,-O2,-O3, and-O3 -ffp-contract=fast, sotest/test.native.jsuses the same bounds.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
Opened as a draft. Note that this environment could not complete
make install-node-modules(the dependency tree currently fails to resolvees-object-atoms@^1.1.2, which is not published), so the package tests were run directly withtapeand lint was run with the repository'setc/eslint/.eslintrc.tests.jsconfiguration; thestdlib/jsdoc-markdown-remarkrule had to be disabled locally because itsmathjax-node-sredependency was unavailable. That rule only applies to Markdown within JSDoc comments, which this pull request does not touch. Full CI verification is therefore deferred to the CI workflows.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code, running as an unattended task. The ULP bounds were measured empirically against the existing fixtures rather than guessed, and verified to be minimal.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_016qDBdX4stVDGqj5ywZ7uwf
Generated by Claude Code