Skip to content

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.

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

@hrshya hrshya closed this Mar 22, 2025
@hrshya hrshya deleted the feat/num branch April 10, 2025 12:25
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