stdlib
stdlib copied to clipboard
RFC: add `sind`
Checklist
Please ensure the following tasks are completed before filing an issue.
- [x] Read and understood the Code of Conduct.
- [x] Searched for existing issues and pull requests.
- [x] If this is a general question, searched the FAQ for an existing answer.
- [x] If this is a feature request, the issue name begins with
RFC:
.
Description
Description of the issue (or feature request).
Compute the sine of x
where x
is in degrees.
Package: @stdlib/math/base/special/sind
Alias: base.sind
For a reference implementation, see Julia.
Related Issues
Does this issue (or feature request) have any related issues?
No.
Questions
Any questions for reviewers?
No.
Other
Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.
No.
Are the degree modules one-liners that multiply by pi / 180 and call out to other functions?
Not necessarily, as one can perform argument reduction for better accuracy. See Julia, for example.
Based on the reference implementation, implementing this package depends on kernel sin
.
cc/ @Planeshifter
I see the above comments on May 6. Is anyone working on this? or can I try ?
No one was yet to work on this as we have yet to implement kernel sin
. @Planeshifter may have some insight into timelines for this.
The kernel sin
function is already there inside of @stdlib/math/base/special/sin
, but needs to be separated into its own package. I can make this a high-priority item and work on this soon so that @vinothdinakar can tackle sind
.
@Planeshifter Looks like we will also need kernel cosine, as well.
If you want to start working on this, @vinothdinakar, you could require the internal package functions directly for now, as in
var kernelSin = require( '@stdlib/math/base/special/sin/lib/kernel_sin.js' );
We can then replace the require statements once the standalone packages are up. I will have the kernel packages done by the end of the week, at latest.
@Planeshifter Awesome!
@vinothdinakar Feel free to submit a PR once you have a working prototype.
Ok Thanks
@vinothdinakar Just to give you an update, @Planeshifter managed to implement the various kernel packages:
@stdlib/math/base/special/kernel-sin @stdlib/math/base/special/kernel-cos
So, if you are still interested and/or already working on it, feel free to use the above packages. :)
Updated reference implementation: https://github.com/JuliaLang/julia/blob/9ef2af9db620644253941e080b5b4986ad0d6091/base/special/trig.jl#L1017