[RFC]: add C implementation for `number/uint32/base/to-int32`
Description
This RFC proposes adding C implementation for number/uint32/base/to-int32.
This is a pre-requisite for the C implementation of stdlib/math/base/special/pow.
Related Issues
Related issues #649.
Questions
No.
Other
No.
Checklist
- [X] I have read and understood the Code of Conduct.
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with
RFC:.
What can be a suitable function signature for this ? cc: @kgryte
@gunjjoshi FYI: pow is already in-flight. See https://github.com/stdlib-js/stdlib/pull/1739.
Thanks for pointing this out @kgryte. We can close this issue then.
I'm not sure this implementation is strictly necessary atm. In C, one can simply do
uint32_t v1 = 4;
// ...
int32_t v2 = (int32_t)v1;
We added the JS package to provide a functional API for "casting", given that JS does not have static types, as in C.
Nevertheless, I think we can keep this open, but this is not high priority and we can revisit later on.
Sounds good. Thanks for explaining this.
i want to work on this issue, if it has not been assigned to someone.