Repository navigation
test: migrate stats/incr/nanmmeanvar to ULP-based assertions - #16082
Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rFkWW1YS1fbtCqw2qnykJ --- 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/incr/nanmmeanvarfrom relative tolerance testing to ULP difference testing, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.Implementation notes:
test/test.js, within the "if not provided an input value, the accumulator function returns the current accumulated values" test). Thedelta/tolcomputation was removed and replaced witht.strictEqual( isAlmostSameValue( actual[ 1 ], expected[ 1 ], 0 ), true, 'returns expected value' );.@stdlib/assert/is-almost-same-valuerequire and removed the now unused@stdlib/math/base/special/absand@stdlib/constants/float64/epsrequires.0. Starting from an ULP bound of64, the bound was tightened downward to the minimum passing integer. The accumulated unbiased sample variance for the test input ([ 2.0, NaN, 3.0, 10.0 ], window size3) is bit-identical to the expected value19.0, so no ULP slack is required.0is therefore both the measured minimum and the floor.make test TESTS_FILTER=".*/stats/incr/nanmmeanvar/.*"), passing 282/282 assertions both times, confirming determinism.test/test.native.js, sotest/test.jsis the only changed file.test: migrate stats/incr/nanmmeanstdev to ULP-based assertions), which also settled on an ULP bound of0.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
make eslint-tests TESTS_FILTER=".*/stats/incr/nanmmeanvar/.*"is clean. The project pre-commit and commit-msg hooks ran and passed; only the EditorConfig lint step was skipped, as this environment cannot download theeditorconfig-checkerbinary. EditorConfig conformance (LF endings, tab indentation, final newline, no new trailing whitespace) was verified manually instead.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code, running as an unattended scheduled task. It studied #11352 and the diffs of previously converted packages to mirror the established idiom, applied the mechanical conversion, and then searched downward from an ULP bound of
64to determine the minimum passing bound empirically.🤖 Generated with Claude Code
https://claude.ai/code/session_014rFkWW1YS1fbtCqw2qnykJ
Generated by Claude Code