feat: add number/float16/base/to-uint32#9300
Open
Neerajpathak07 wants to merge 8 commits intostdlib-js:developfrom
Open
feat: add number/float16/base/to-uint32#9300Neerajpathak07 wants to merge 8 commits intostdlib-js:developfrom
number/float16/base/to-uint32#9300Neerajpathak07 wants to merge 8 commits intostdlib-js:developfrom
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Neerajpathak07
commented
Dec 21, 2025
Comment on lines
29
to
38
| // Generate an array of random numbers: | ||
| var f64 = uniform( 100, 0.0, 100.0, { | ||
| 'dtype': 'float64' | ||
| }); | ||
|
|
||
| // Convert each value to a half-precision floating-point number: | ||
| var f16 = map( f64, naryFunction( float64ToFloat16, 1 ) ); | ||
|
|
||
| // Convert each half-precision floating-point number to the nearest unsigned 32-bit integer: | ||
| logEachMap( 'float16: %f => uint32: %d', f16, pickArguments( float16ToUint32, [ 1 ] ) ); |
Member
Author
There was a problem hiding this comment.
Created map for half-precision values deriving it from f64 and using the suitable toFloat16 variable.
The recursive way does give out desirable examples in a much smaller time complexity.
Neerajpathak07
commented
Dec 23, 2025
lib/node_modules/@stdlib/number/float16/base/to-uint32/docs/repl.txt
Outdated
Show resolved
Hide resolved
gururaj1512
requested changes
Jan 3, 2026
lib/node_modules/@stdlib/number/float16/base/to-uint32/examples/index.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/number/float16/base/to-uint32/README.md
Outdated
Show resolved
Hide resolved
Member
Author
|
/stdlib update-copyright-years |
Contributor
@Neerajpathak07, the slash command failed to complete. Please check the workflow logs for details. |
Member
Author
|
/stdlib merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves none.
Description
This pull request:
number/float16/base/to-uint32Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers