Skip to content

refactor: use constants/float32/nan in math/base/special/atanhf - #17079

Merged
Planeshifter merged 1 commit into
stdlib-js:developfrom
chirag-433:refactor/atanhf-nan
Dec 3, 2026
Merged

Planeshifter merged 1 commit into
stdlib-js:developfrom
chirag-433:refactor/atanhf-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/atanhf/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?

  • atanhf 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.

git diff --check passed and the manifest JSON parses successfully. Package tests 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 (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • 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 float32 NaN constant change as a reference.


@stdlib-js/reviewers

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

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/atanhf $\\color{green}255/255$
$\\color{green}+100.00\\%$
$\\color{green}24/24$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}255/255$
$\\color{green}+100.00\\%$

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

@Planeshifter Planeshifter changed the title refactor: use constants/float32/nan in math/base/special/atanhf refactor: use constants/float32/nan in math/base/special/atanhf Dec 3, 2026
@Planeshifter
Planeshifter merged commit 170a8db into stdlib-js:develop Dec 3, 2026
68 checks passed
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Dec 3, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants