feat: add C implementation for math/base/special/betainc#4037
feat: add C implementation for math/base/special/betainc#4037Neerajpathak07 wants to merge 1 commit intostdlib-js:developfrom
math/base/special/betainc#4037Conversation
|
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? |
| */ | ||
|
|
||
| #include "stdlib/math/base/special/betainc.h" | ||
| #include "stdlib/math/base/special/kernelbetainc.h" |
There was a problem hiding this comment.
| #include "stdlib/math/base/special/kernelbetainc.h" | |
| #include "stdlib/math/base/special/kernel_betainc.h" |
Awaiting the necessary C implementation for the dependent package.

Progresses #649
Resolves #3423
Description
This pull request:
math/base/special/betaincRelated Issues
This pull request:
progresses [RFC]: Add C implementations to base special math functions (tracking issue) #649
resolves [RFC]: Add C implementation for
@stdlib/stats/base/dists/beta/cdf#3423Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers