Skip to content

feat: add C implementation for stats/base/dists/t/quantile - #15411

Open
Planeshifter wants to merge 2 commits into
philipp/f-quantile-cfrom
philipp/t-quantile-c
Open

Planeshifter wants to merge 2 commits into
philipp/f-quantile-cfrom
philipp/t-quantile-c

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Sep 21, 2026

Copy link
Copy Markdown
Member

Progresses stdlib-js/metr-issue-tracker#1236.

Description

What is the purpose of this pull request?

This pull request:

  • adds a C implementation for @stdlib/stats/base/dists/t/quantile

The implementation uses kernel-betaincinv directly, preserving both the inverse value and its complement via out-pointers to maintain numerical accuracy in extreme tails (avoids recomputing the complement via subtraction).

Related Issues

Does this pull request have any related issues?

This pull request:

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

This PR was written primarily by Claude Code under my direction.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Sep 21, 2026
@stdlib-bot

stdlib-bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/t/quantile $\\color{red}297/300$
$\\color{green}+0.00\\%$
$\\color{green}24/24$
$\\color{green}+0.00\\%$
$\\color{red}3/4$
$\\color{green}+0.00\\%$
$\\color{red}297/300$
$\\color{green}+0.00\\%$

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

@stdlib-js stdlib-js deleted a comment from stdlib-bot Sep 21, 2026
@stdlib-js stdlib-js deleted a comment from stdlib-bot Sep 21, 2026
Planeshifter and others added 2 commits September 21, 2026 15:37
This commit adds a complete C/native surface for the F distribution
quantile function. The implementation uses kernel-betaincinv directly,
preserving both the inverse value and its complement via out-pointers
to maintain numerical accuracy in extreme tails.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit adds a complete C/native surface for the Student's t
distribution quantile function. The implementation uses
kernel-betaincinv directly, preserving both the inverse value and its
complement via out-pointers to maintain numerical accuracy in extreme
tails.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Planeshifter
Planeshifter marked this pull request as ready for review September 21, 2026 20:39
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 21, 2026

This branch has not been deployed

No deployments
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