Skip to content

refactor: use constants/float32/nan in math/base/special/bernoullif - #17040

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

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

Conversation

@chirag-433

Copy link
Copy Markdown
Contributor

Resolves a part of #11743.

Description

What is the purpose of this pull request?

This pull request:

  • Replaces inline float32 NaN generation in math/base/special/bernoullif/src/main.c with STDLIB_CONSTANT_FLOAT32_NAN.
  • Adds the float32 NaN header and adds @stdlib/constants/float32/nan to the build, benchmark, and examples dependencies in manifest.json.

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 float32 NaN constant header, macro, and manifest dependency pattern.

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

  • bernoullif already uses float32 positive and negative infinity constants. The NaN dependency was added to all three manifest configurations that compile src/main.c.

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 overlapping PR for bernoullif referencing #11743 was found. git diff --check passed; package tests and native checks were not 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 identify the package, check for overlapping PRs, and update the C source and manifest, following the merged minf change as a reference.


@stdlib-js/reviewers

@chirag-433
chirag-433 requested a review from a team December 1, 2026 07:17
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. labels Dec 1, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/bernoullif $\\color{green}240/240$
$\\color{green}+100.00\\%$
$\\color{green}16/16$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}240/240$
$\\color{green}+100.00\\%$

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

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. Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants