Skip to content

feat: add C implementation for invgamma/quantile#13640

Open
ujjwalv01 wants to merge 5 commits into
stdlib-js:developfrom
ujjwalv01:feat-add-invgamma-quantile-c
Open

feat: add C implementation for invgamma/quantile#13640
ujjwalv01 wants to merge 5 commits into
stdlib-js:developfrom
ujjwalv01:feat-add-invgamma-quantile-c

Conversation

@ujjwalv01

Copy link
Copy Markdown
Contributor

Resolves #3677.

Description

What is the purpose of this pull request?

This pull request:

  • Adds a native C implementation for the @stdlib/stats/base/dists/invgamma/quantile package.
  • Adds N-API bindings to wrap the C logic for Node.js usage.
  • Updates lib/index.js to intelligently fall back to the pure JavaScript implementation if the native addon fails to compile or load.
  • Adds C and JS native benchmarks, C examples, and native tests.
  • Updates the package documentation (README.md) to document the newly exposed C API.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

I consulted an AI assistant to understand the codebase structure and how native C addons and bindings are scaffolded in stdlib, but the proposed changes were manually implemented and integrated.


@stdlib-js/reviewers

@ujjwalv01
ujjwalv01 requested a review from a team July 24, 2026 10:10
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Jul 24, 2026
@ujjwalv01
ujjwalv01 marked this pull request as draft July 24, 2026 10:27
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 24, 2026
@stdlib-bot

stdlib-bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/invgamma/quantile $\\color{red}298/314$
$\\color{green}+0.00\\%$
$\\color{red}15/16$
$\\color{green}+0.00\\%$
$\\color{red}3/4$
$\\color{green}+0.00\\%$
$\\color{red}298/314$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

@ujjwalv01
ujjwalv01 marked this pull request as ready for review July 24, 2026 15:07
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Add C implementation for @stdlib/stats/base/dists/invgamma/quantile

2 participants