-
-
Notifications
You must be signed in to change notification settings - Fork 837
feat: add math/base/special/cpolarf
#7342
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?
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: 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: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - 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: passed - 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: passed - 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: na - 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
z = new Complex64( re, im ); | ||
o = cpolarf( z ); | ||
z = z.toString(); | ||
console.log( 'absf(%s) = %d. argf(%s) = %d', z, o[ 0 ], z, o[ 1 ] ); |
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.
The reason why it doesn't have the same words as cpolarf
, cphasef
and cabsf
in here and in README, is because they cause a cs-spell-checker lint error.
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.
As compared to the example.c
file
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.
The lint rule's behavior is configured in https://github.com/stdlib-js/stdlib/blob/0da78b462b0783c2d7d145d477b20c8750ed8486/etc/eslint/rules/spellcheck.js. Would be good to add exceptions there.
Coverage Report
The above coverage report was generated for the changes in this PR. |
- **cphasef**: `[out] float*` destination for the phase value in radians. | ||
|
||
```c | ||
float stdlib_base_cpolarf( const stdlib_complex64_t z, float *cabsf, float *cphasef ); |
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.
float stdlib_base_cpolarf( const stdlib_complex64_t z, float *cabsf, float *cphasef ); | |
void stdlib_base_cpolarf( const stdlib_complex64_t z, float *cabsf, float *cphasef ); |
* var v = cpolarf( new Complex64( 5.0, 3.0 ) ); | ||
* // returns [ ~5.83, ~0.5404 ] | ||
*/ | ||
( z: Complex64 ): Array<number>; |
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.
Same question of whether we should return a tuple here, which would be slightly more type-safe:
( z: Complex64 ): Array<number>; | |
( z: Complex64 ): [ number, number ]; |
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.
Should be ready once updating return type and fixing function signature.
Progresses #649
Description
This pull request:
math/base/special/cpolarf
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers