Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KocjgCMG1pBSHfwYA2NQhR --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: skipped - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
|
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/vartestfrom relative tolerance assertions to ULP difference assertions, as proposed in [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.delta/tolcomputation and correspondingt.ok( delta <= tol, ... )assertion witht.strictEqual( isAlmostSameValue( actual, expected, <ULP> ), true, 'returns expected value' );.@stdlib/assert/is-almost-same-valuerequire and removes the now unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.Only
test/test.jsis modified; no implementation, documentation, or benchmark files are touched. Pre-existing exact assertions (e.g.,out.pValuefor theratiooption fixture, the0.0lower CI bound, and the+Infinityupper CI bound) are left as-is, as exact comparisons remain correct for those cases.The ULP bounds below are the measured minimums for each comparison: the tests pass at the stated value and fail at one ULP lower, as verified by computing
number/float64/base/ulp-differencefor every assertion.twosided.pValue250.0 * EPStwosided.statistic1.0 * EPStwosided.lower(lower CI)5.0 * EPStwosided.upper(upper CI)10.0 * EPSdiff.statistic1.0 * EPSdiff.lower(lower CI)6.0 * EPSdiff.upper(upper CI)12.0 * EPSless.pValue5.0 * EPSless.statistic1.0 * EPSless.upper(upper CI)5.0 * EPSgreater.pValue250.0 * EPSgreater.statistic1.0 * EPSgreater.lower(lower CI)1.0 * EPSRelated 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
make test TESTS_FILTER=".*/stats/vartest/.*"passes (83/83). The suite was run three times at the final ULP values to confirm the results are deterministic.make lint-javascript-tests TESTS_FILTER=".*/stats/vartest/.*"is clean.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code, mirroring the migration idiom established by previously merged conversions in this family (e.g.,
stats/base/dists/exponential/variance,stats/levene-test). The ULP bounds were measured empirically rather than guessed.@stdlib-js/reviewers
Generated by Claude Code