-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add C implementation for number/float16/base/mul
#9487
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
Closed
Neerajpathak07
wants to merge
5
commits into
stdlib-js:develop
from
Neerajpathak07:C-float16/base/mul
Closed
feat: add C implementation for number/float16/base/mul
#9487
Neerajpathak07
wants to merge
5
commits into
stdlib-js:develop
from
Neerajpathak07:C-float16/base/mul
Conversation
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
Neerajpathak07
commented
Jan 2, 2026
Comment on lines
+21
to
+33
| var toFloat16 = require( '@stdlib/number/float64/base/to-float16' ); | ||
| var uniform = require( '@stdlib/random/array/uniform' ); | ||
| var map = require( '@stdlib/array/base/map' ); | ||
| var logEachMap = require( '@stdlib/console/log-each-map' ); | ||
| var mul = require( './../lib' ); | ||
| var mul= require( './../lib' ); | ||
|
|
||
| var x = discreteUniform( 100, -50, 50 ); | ||
| var y = discreteUniform( 100, -50, 50 ); | ||
| // Create an array of random half-precision floating-point numbers: | ||
| var x = map( uniform( 100, -50.0, 50.0 ), toFloat16 ); | ||
|
|
||
| logEachMap( '%d x %d = %d', x, y, mul ); | ||
| // Create an array of random half-precision floating-point numbers: | ||
| var y = map( uniform( 100, -50.0, 50.0 ), toFloat16 ); | ||
|
|
||
| logEachMap( '%0.4f x %0.4f => %0.4f', x, y, mul); |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the pre-existing example similar in the markdown as well!!
Member
Author
|
/stdlib update-copyright-years |
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Member
|
@Neerajpathak07 This appears to be a duplicate of #9486. |
Member
Author
|
ahh my bad will close this one!! |
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/mulRelated 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