Skip to content

refactor: use constants/float64/nan in stats/base/dists/beta/median - #17037

Open
chirag-433 wants to merge 1 commit into
stdlib-js:developfrom
chirag-433:refactor/beta-median-nan
Open

chirag-433 wants to merge 1 commit into
stdlib-js:developfrom
chirag-433:refactor/beta-median-nan

Conversation

@chirag-433

@chirag-433 chirag-433 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Resolves a part of #11743.

Description

What is the purpose of this pull request?

This pull request:

  • Replaces inline NaN generation in stats/base/dists/beta/median/src/main.c with STDLIB_CONSTANT_FLOAT64_NAN.
  • Adds the float64 NaN constant header and adds @stdlib/constants/float64/nan to the build, benchmark, and examples dependencies in manifest.json.
  • Leaves the C README, example, and benchmark unchanged because they contain no inline NaN generation.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

This pull request followed:

What carried over from the reference(s)?

  • The float64 NaN constant header, macro, and manifest dependency pattern.

What differed, or what did you have to work out yourself?

  • beta/median retains its existing input validation and betaincinv dependency. The NaN constant dependency was added to all three manifest configurations.

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.

git diff --check passed. The package build, C examples, C benchmark, and tests have not been run.

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
  • Test/benchmark generation
  • Documentation
  • Research and understanding

Disclosure

I used AI to update the C source and manifest, following the merged beta/mean migration as a reference.


@stdlib-js/reviewers

@chirag-433
chirag-433 requested a review from a team December 1, 2026 06:52
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Dec 1, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. and removed Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Dec 1, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/beta/median $\\color{green}196/196$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}196/196$
$\\color{green}+100.00\\%$

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

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Dec 1, 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

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.

2 participants