Skip to content

feat: add C implementation for stats/base/dists/t/logcdf - #14694

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/t-logcdf-c
Draft

feat: add C implementation for stats/base/dists/t/logcdf#14694
Planeshifter wants to merge 1 commit into
developfrom
philipp/t-logcdf-c

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Aug 27, 2026

Copy link
Copy Markdown
Member

Resolves #3872.

Description

What is the purpose of this pull request?

This pull request:

  • adds a C implementation and Node-API native addon for @stdlib/stats/base/dists/t/logcdf, including C headers, GYP/Makefile build configurations, JavaScript/C benchmarks and examples, native unit tests, and README documentation updates. The implementation is a faithful port of the JavaScript implementation, preserving parameter validation, endpoint behavior, NaN/infinity handling, and the incomplete-beta branch selection and tail-specific formulas (log1p for the positive tail, direct logarithms for the negative tail).

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.

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

This PR was written primarily by Claude Code, using the merged stats/base/dists/beta/cdf and beta/logcdf C implementations as templates; the changes were validated locally (native addon built, all native tests passing, ULP bounds measured) before submission.


@stdlib-js/reviewers

@Planeshifter Planeshifter added the METR Pull request associated with the METR project. label Aug 27, 2026
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Aug 27, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! 👋

We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm!

Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks.

Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀

For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers!

@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Aug 27, 2026
---
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_kebab_filenames
    status: passed
---

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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. METR Pull request associated with the METR project. 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/t/logcdf

2 participants