stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

RFC: add `sind`

Open kgryte opened this issue 7 years ago • 11 comments

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.

kgryte avatar Dec 06 '16 08:12 kgryte

Are the degree modules one-liners that multiply by pi / 180 and call out to other functions?

rreusser avatar May 06 '17 21:05 rreusser

Not necessarily, as one can perform argument reduction for better accuracy. See Julia, for example.

kgryte avatar May 06 '17 21:05 kgryte

Based on the reference implementation, implementing this package depends on kernel sin.

cc/ @Planeshifter

kgryte avatar May 06 '17 23:05 kgryte

I see the above comments on May 6. Is anyone working on this? or can I try ?

vinothdinakar avatar Aug 21 '17 17:08 vinothdinakar

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.

kgryte avatar Aug 21 '17 17:08 kgryte

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 avatar Aug 21 '17 17:08 Planeshifter

@Planeshifter Looks like we will also need kernel cosine, as well.

kgryte avatar Aug 21 '17 17:08 kgryte

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 avatar Aug 21 '17 17:08 Planeshifter

@Planeshifter Awesome!

@vinothdinakar Feel free to submit a PR once you have a working prototype.

kgryte avatar Aug 21 '17 17:08 kgryte

Ok Thanks

vinothdinakar avatar Aug 21 '17 17:08 vinothdinakar

@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

kgryte avatar Aug 30 '17 03:08 kgryte