feat: add C implementation for stats/base/dists/invgamma/quantile#13640
Merged
Planeshifter merged 11 commits intoJul 25, 2026
Conversation
ujjwalv01
marked this pull request as draft
July 24, 2026 10:27
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
…overage, and remove redundant include
- Add missing `// returns NaN` on non-positive shape parameter example in native.js and main.js
- Fix 'rate parameter' to 'scale parameter' in main.js JSDoc
- Remove redundant `<stdbool.h>` include from src/main.c
- Fix test.native.js import ordering (tryRequire after tape, add PINF)
- Rename tape descriptions from 'negative' to 'nonpositive' for alpha/beta
- Add alpha=0 and beta=0 edge-case tests
- Add full PINF/NINF/NaN combination sub-assertions matching test.quantile.js
---
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: passed
- 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: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
…ntions
- Revert lib/index.js to use direct main export without tryRequire
(matching all 458 other distribution packages)
- Replace rand_double()/raw rand() with random_uniform(min,max) helper
in benchmark.c and example.c
- Use pre-generated arrays with i%100 indexing in benchmark.c
- Use convention-matching print_results(elapsed) signature
- Update NAME define to 'invgamma-quantile'
- Use 25 iterations and Unicode symbols in example.c
- Remove return 0 from main() in benchmark.c and example.c
- Sync README C example with example.c
---
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: 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: 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
---
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Planeshifter
previously approved these changes
Jul 25, 2026
Planeshifter
left a comment
Member
There was a problem hiding this comment.
LGTM after clean-up. Thanks, @ujjwalv01!
Contributor
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |
…ve.js
---
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: 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
---
Planeshifter
previously approved these changes
Jul 25, 2026
stats/base/dists/invgamma/quantile
- Add missing @Private annotation to lib/native.js - Swap addon.c include order (napi header first) - Reorder NaN checks in src/main.c to match signature order - Add wasm:false to manifest.json options and confs - Move napi/ternary dep to first position in build confs - Fix package.json keywords: cdf->quantile, dist->dists, add 'quantile function', remove c/addon/napi - Use @stdlib/random/array/uniform in benchmark.native.js - Fix operator spacing in benchmark.c random_uniform and tic - Swap FIXTURES/VARIABLES section ordering in test.native.js - Fix inconsistent alpha: spacing in test assertion messages - Restore verbose HTML comments and notes section in README --- 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: 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: na - 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 ---
…tions
---
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: 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: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Planeshifter
approved these changes
Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3677.
Description
This pull request:
@stdlib/stats/base/dists/invgamma/quantilepackage.lib/index.jsto intelligently fall back to the pure JavaScript implementation if the native addon fails to compile or load.README.md) to document the newly exposed C API.Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
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