Repository navigation
feat: add C implementation for math/base/special/betainc - #4037
Conversation
|
This PR will need the C implementation for |
|
Hey @Neerajpathak07, was reviewing this since it depends on kernel-betainc which I've been following closely. Found a few things in src/main.c that might block compilation: Line 52 uses double out = [ 0.0, 0.0 ] which is JS syntax - in C this would need to be separate variable declarations like double out; double deriv; Lines 53-54 redeclare regularized and upper, which are already function parameters - compiler will error there. Line 55 calls stdlib_base_kernelBetainc but the actual C function in #10279 is stdlib_base_kernel_betainc (snake_case), and it expects pointer arguments (&out, &deriv) rather than array and stride. The header include on line 27 should be kernel_betainc.h instead of kernelbetainc.h. Also minor - the @returns JSDoc says "natural logarithm of beta function" but the function returns the incomplete beta value, worth updating to avoid confusion. Hope this helps move things forward! |
This comment was marked as duplicate.
This comment was marked as duplicate.
3 similar comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
An automated check found a potentially unrelated issue/PR reference in this PR:
Why this matters: GitHub automatically closes issues referenced with closing keywords (Resolves, Closes, Fixes) when the PR is merged. If What to do:
This assessment was generated by an AI model and is informational only.
|
|
@rautelaKamal why do we have multiple duplicate comments here correct me if I am mistaken here but are you using any LLM's to perform code reviews? |
|
Hi @Neerajpathak07 , since PR #10279 is merged now I think you can move ahead with implementation of |
---
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_pkg_readmes
status: passed
- 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: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- 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: 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_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: missing_dependencies
- 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_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: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- 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_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: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- 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
---
The current file contents are non-standard and caused an infinite loop: when node-gyp processed binding.gyp, it included include.gypi, which included include.gypi... Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
|
/stdlib update-copyright-years |
|
@Planeshifter accidently marked this open. I am on the changes and testing those to resolve the CI. |
---
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_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: passed
- 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
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
---
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_pkg_readmes
status: passed
- 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
---
|
Since Lint failure is not related to changes in this PR. I'll go ahead and request a review. |
|
@Planeshifter Can we try and land this in the following week so as to unblock |
adc3855 to
5ac2e90
Compare
- fix invalid arity in main.c doc example and use const bool params - remove dead no-op boolean coercion in main.c - use scalar out variable instead of 2-element array in main.c - fix TAP label (c::cephes -> c::native) and benchmark default variant in C benchmark - add explicit-variant benchmarks to benchmark.native.js matching labels - remove stale wasm fields from manifest.json - fix README C example annotation and signature, remove stray blank line - reorder VARIABLES/FIXTURES sections and use t.strictEqual in test.native.js - mirror main.js boolean coercion semantics in native.js - add missing blank line after include guard in header
5ac2e90 to
88a873f
Compare
Planeshifter
left a comment
There was a problem hiding this comment.
Needed to do significant clean-up, but should be good to go now.
Note: We need to ensure the license comments are accurate; in this case, since this package is a thin wrapper around kernel-betainc, I removed the license comment and LICENSE file. But notice they were inconsistent with each other and incorrect.
Also, the EditorConfig lint failures were due to the changes in this PR, see a77b061 which caused the checkmark to turn green.
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |

Progresses #649
Description
This pull request:
math/base/special/betaincRelated Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers