-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add H_H macro in math/base/napi/unary
#9576
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
base: develop
Are you sure you want to change the base?
Conversation
math/base/napi/unaryH_H macro in math/base/napi/unary
| #include "stdlib/number/float64/base/to_float16.h" | ||
| #include "stdlib/number/float16/base/to_float64.h" | ||
| #include "stdlib/number/float16/ctor.h" | ||
| static stdlib_float16_t scale( const stdlib_float16_t x ) { | ||
| double y = stdlib_base_float16_to_float64( x ); | ||
| y *= 10.0; | ||
| return stdlib_base_float64_to_float16( y ); | ||
| } |
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.
refactored scale fcn to adhere to float16 as prev:-
static double scale( const double x ) {
return x * 10.0;
}| #ifndef STDLIB_MATH_BASE_NAPI_UNARY_H_H_H | ||
| #define STDLIB_MATH_BASE_NAPI_UNARY_H_H_H | ||
|
|
||
| #include "stdlib/number/float16/ctor.h" |
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.
not sure why CI is failing for this header,
ref:- https://github.com/stdlib-js/stdlib/actions/runs/20740182522/job/59545266614
lib/node_modules/@stdlib/math/base/napi/unary/include/stdlib/math/base/napi/unary/h_h.h
Outdated
Show resolved
Hide resolved
Signed-off-by: Neeraj Pathak <neerajrpathak710@gmail.com>
Resolves none.
Description
This pull request:
H_Hmacro inmath/base/napi/unaryRelated 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