Skip to content

feat: add C implementation for stats/base/dists/gamma/quantile - #14657

Open
Planeshifter wants to merge 1 commit into
developfrom
philipp/gamma-quantile-c
Open

feat: add C implementation for stats/base/dists/gamma/quantile#14657
Planeshifter wants to merge 1 commit into
developfrom
philipp/gamma-quantile-c

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Aug 26, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds a C native addon implementation for stats/base/dists/gamma/quantile

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.

The C implementation delegates to stdlib_base_gammaincinv (which already has C support) and follows the same parameter validation as the JavaScript implementation.

Files added: src/main.c, src/addon.c, C header, lib/native.js, manifest.json, binding.gyp, include.gypi, test/test.native.js, benchmark/benchmark.native.js, benchmark/c/, examples/c/, src/Makefile. Updated package.json with gypfile and directory entries.

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.".

This PR was authored by Claude Code under my direction.


@stdlib-js/reviewers

@Planeshifter
Planeshifter force-pushed the philipp/gamma-quantile-c branch 2 times, most recently from 3cbafc5 to e357a45 Compare August 26, 2026 16:53
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Aug 26, 2026
@Planeshifter
Planeshifter force-pushed the philipp/gamma-quantile-c branch 2 times, most recently from 11c23b1 to ce3222c Compare August 26, 2026 17:09
@stdlib-bot

stdlib-bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/gamma/quantile $\\color{green}304/304$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}304/304$
$\\color{green}+0.00\\%$

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

@Planeshifter
Planeshifter marked this pull request as ready for review August 26, 2026 17:20
@Planeshifter
Planeshifter requested a review from a team August 26, 2026 17:20
This commit adds a native C implementation for the gamma distribution
quantile function. The implementation delegates to `gammaincinv` which
already has C support.

---

## AI Assistance Disclosure

This commit was drafted with the help of AI (Claude). A human reviewed and
approved all changes before merging.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---
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: passed
  - 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: passed
  - task: lint_c_examples
    status: passed
  - task: lint_c_benchmarks
    status: passed
  - 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
---
@Planeshifter
Planeshifter force-pushed the philipp/gamma-quantile-c branch from ce3222c to 047167d Compare August 26, 2026 17:34
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants