test: migrate math/base/special/cos to ULP-based testing#11281
test: migrate math/base/special/cos to ULP-based testing#11281kgryte merged 5 commits intostdlib-js:developfrom
math/base/special/cos to ULP-based testing#11281Conversation
---
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: passed
- 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
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
/stdlib update-copyright-years |
@nirmaljb, the slash command failed to complete. Please check the workflow logs for details. |
---
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: passed
- 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
---
lib/node_modules/@stdlib/math/base/special/cos/test/test.native.js
Outdated
Show resolved
Hide resolved
math/base/special/cos to ULP-based testingmath/base/special/cos to ULP-based testing
---
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: passed
- 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
---
|
@kgryte I've addressed your reviews and made those changes. |
---
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: passed
- 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
---
|
@anandkaranubc I've addressed the changes that you suggested, please take a look. |
kgryte
left a comment
There was a problem hiding this comment.
LGTM.
@nirmaljb Before opening an RFC, we should also do a migration for a package requiring tolerances greater than 1 ULP. E.g., https://github.com/stdlib-js/stdlib/tree/8b19d00b71edcd61143c31573eab59cfc6936ab4/lib/node_modules/%40stdlib/math/base/special/ellipe.
I am thinking we should also provide a reference PR which is a little less straightforward and requires fiddling with the tolerances a bit.
|
@kgryte Thank you for the merge. I will search for such functions that require greater than 1 ulp and confirm with you or @anandkaranubc before opening the RFC. |
|
Completely second what @kgryte mentioned. Also, while making these changes, make sure the ULP difference you use is the smallest possible for that case. This also means that if you can use cc: @nirmaljb |
|
@anandkaranubc Wouldn't that mean that I have to use this branch? if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], ...); |
|
@nirmaljb No, he is suggesting that if you don't have to use approximate equality tests, then don't. So if all the test fixtures match the expected results exactly, there is no need to use |
|
Got it! @kgryte |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #{{TODO: add issue number}}.
Description
This pull request:
@stdlib/assert/is-almost-same-valuefor testingRelated Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers