Repository navigation
test: migrate stats/base/dists/gumbel/logcdf to ULP-based assertions - #15935
Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E4yjfSfyfuMeBqGUuHs5uY
|
Hello! 👋 We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm! Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks. Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀 For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
Resolves a part of #11352.
Description
This pull request:
stats/base/dists/gumbel/logcdffrom relative tolerance testing to ULP difference testing, as described in [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.delta/tolcomputations (and theabs/EPSrequires they depended on) withisAlmostSameValue( y, expected[ i ], 0 )assertions intest/test.logcdf.js,test/test.factory.js, andtest/test.native.js.The ULP bound was tightened empirically. Starting from
64, the bound was lowered until reaching the minimum value which still passes over the full fixture set (positive_mean.json,negative_mean.json, andlarge_variance.json; 2992 compared values per test file).Final ULP constant:
0for all three test files. This is the measured minimum: a direct ULP-difference measurement against the fixtures gives a maximum observed difference of0ULP for the main export, the factory-created function, and the native implementation — i.e., every fixture value is returned bit-exact. The suite was run twice at the final bound to confirm determinism, and the native add-on was built locally so thattest/test.native.jswas actually exercised rather than skipped.Verification:
make test TESTS_FILTER=".*/stats/base/dists/gumbel/logcdf/.*"passes (3007 + 3010 + 3 + 3007 assertions), twice in a row with identical results.make lint-javascript-files(with the test ESLint configuration) is clean for the changed files.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 authored by Claude Code, which performed the mechanical test migration, measured the minimum ULP bound against the fixtures, and verified the tests and linting locally.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_01E4yjfSfyfuMeBqGUuHs5uY
Generated by Claude Code