Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add constants/float32/num-high-word-significand-bits #6262

Closed
wants to merge 4 commits into from

Conversation

hrshya
Copy link
Contributor

@hrshya hrshya commented Mar 21, 2025

Progresses #649 .

Description

What is the purpose of this pull request?

This pull request:

  • adds constants/float32/num-high-word-significand-bits .

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.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 21, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Mar 21, 2025

Coverage Report

Package Statements Branches Functions Lines
constants/float32/num-high-word-significand-bits $\color{green}47/47$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}47/47$
$\color{green}+100.00\%$
constants/float32/significand-bits $\color{green}47/47$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}47/47$
$\color{green}+100.00\%$

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

hrshya and others added 2 commits March 21, 2025 20:13
Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
@kgryte
Copy link
Member

kgryte commented Mar 21, 2025

Single-precision floating-point numbers don't have "high words", as an entire float fits in a single int32 word. Traditionally, we've used @stdlib/constants/float32/precision (minus one) for the value exposed by this PR; however, I am open to including @stdlib/constants/float32/significand-bits. As such, you'd need to rename the package and the variable name accordingly.

@kgryte kgryte added Feature Issue or pull request for adding a new feature. Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Mar 21, 2025
@hrshya
Copy link
Contributor Author

hrshya commented Mar 22, 2025

Single-precision floating-point numbers don't have "high words", as an entire float fits in a single int32 word. Traditionally, we've used @stdlib/constants/float32/precision (minus one) for the value exposed by this PR; however, I am open to including @stdlib/constants/float32/significand-bits. As such, you'd need to rename the package and the variable name accordingly.

Thanks for the clarification. I will rename the package and variable to use significand-bits and make the required updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. Needs Changes Pull request which needs changes before being merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants