Repository navigation
test: migrate blas/base/wasm/zdrot to ULP-based assertions - #16159
Conversation
Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MKVz6SjHj3NxsAsZRF387
|
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:
blas/base/wasm/zdrotfrom relative tolerance assertions to ULP difference assertions, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.EPS/absbasedisApproxtolerance helper intest/test.main.js,test/test.ndarray.js,test/test.module.main.js, andtest/test.module.ndarray.jswith@stdlib/assert/is-almost-same-value, mirroring the already migratedblas/base/wasm/csrotandblas/base/wasm/zscalpackages.The
isApproxhelper now accepts a maximum allowed ULP difference instead of a relative tolerance:ULP bound:
1ULP, applied uniformly at all 50isApproxcall sites (12 intest.main.js, 14 intest.ndarray.js, 10 intest.module.main.js, 14 intest.module.ndarray.js), replacing the previous2.0relative tolerance factor.This is the measured minimum. The maximum observed ULP difference at every individual call site is exactly
1, so no call site can be tightened further: the full suite fails (16 failing assertions) at0ULP and passes at1ULP. The suite was run twice at the final bound to confirm determinism; all 536 assertions across the package's seven test files pass in both runs.Only test files are modified; no implementation, documentation, or benchmark changes are included.
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
The
lint-editorconfig-filesstep could not run in the authoring environment, as it requires downloading theeditorconfig-checkerbinary from GitHub releases, which was not reachable. EditorConfig conformance (tab indentation, LF line endings, no trailing whitespace, final newline) was verified manually instead. ESLint, usingetc/eslint/.eslintrc.tests.js, passes cleanly on all four changed files.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code. The test migration mirrors the idiom established in the already merged
blas/base/wasm/csrotmigration, and the1ULP bound was determined empirically by instrumenting every assertion to record its minimum passing ULP difference, then verifying the full suite twice at that bound.@stdlib-js/reviewers
Generated by Claude Code