-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add math/base/special/sincosdf
#9822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: add math/base/special/sincosdf
#9822
Conversation
---
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: passed
- task: lint_package_json
status: passed
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- task: lint_c_examples
status: missing_dependencies
- task: lint_c_benchmarks
status: missing_dependencies
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
math/base/special/sincosdf
Planeshifter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your first PR! Left initial comments.
| t.end(); | ||
| }); | ||
|
|
||
| tape('the function computes the sine and cosine (for -256*180.0 < x < 0)', function test(t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case is a duplicate of the one starting at line 49 - both test mediumNegative data with the same description 'the function computes the sine and cosine (for -256*180.0 < x < 0)'.
This should likely test mediumPositive instead, similar to how test.main.js has four distinct test blocks covering medium negative, medium positive, large negative, and large positive ranges.
| // MODULES // | ||
|
|
||
| var tape = require( 'tape' ); | ||
| var sincosdf = require( './../lib/native.js' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should use tryRequire with a skip option to gracefully handle the case when the native addon isn't built.
Compare with the reference at sincos/test/test.native.js which uses:
var resolve = require( 'path' ).resolve;
var tryRequire = require( '@stdlib/utils/try-require' );
var sincosdf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
var opts = {
'skip': ( sincosdf instanceof Error )
};
tape( 'main export is a function', opts, function test( t ) {
// ...
});There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! I’ll update the test to use tryRequire with the skip option, following the pattern from sincos/test/test.native.js, so it gracefully handles the case when the native addon isn’t built.
Will push the fixes shortly. Appreciate the guidance!
| * Simultaneously computes the sine and cosine of a single-precision floating-point number (in degrees). | ||
| * | ||
| * @param {number} x - input value (in degrees) | ||
| * @returns {Array<number>} sine and cosine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing @example tags in the JSDoc. E.g.,
* @example
* var v = sincosdf( 0.0 );
* // returns [ 0.0, 1.0 ]
*
* @example
* var v = sincosdf( 90.0 );
* // returns [ 1.0, ~0.0 ]
*
* @example
* var v = sincosdf( NaN );
* // returns [ NaN, NaN ]
lib/node_modules/@stdlib/math/base/special/sincosdf/lib/main.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/sincosdf/lib/assign.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/sincosdf/lib/native.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/sincosdf/lib/index.js
Outdated
Show resolved
Hide resolved
Coverage ReportNo coverage information available. |
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: ByteKnight28 <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: ByteKnight28 <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: ByteKnight28 <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: ByteKnight28 <[email protected]>
---
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: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- 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: missing_dependencies
- 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
---
---
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: na
- task: lint_javascript_benchmarks
status: passed
- 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
---
---
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: na
- task: lint_javascript_benchmarks
status: passed
- 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
---
---
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: na
- 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
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves a part of #649 .
Description
This pull request:
Related 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
None.
@stdlib-js/reviewers