stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Compute sine

Open ChristopherBan opened this issue 2 years ago • 3 comments

Compute the sine of x where x is in degrees.

Package: @stdlib/math/base/special/sind Alias: base.sind

For a reference implementation, see this link.

Guide:

  • Read and understood the Code of Conduct. Searched for existing issues and pull requests. If this is a general question, searched the FAQ for an existing answer. If this is a feature request, the issue name begins with RFC: .

ChristopherBan avatar Feb 04 '23 13:02 ChristopherBan

:tada: Welcome! :tada:

And thank you for opening your first issue! We will get back to you shortly. :runner: :dash:

stdlib-bot avatar Feb 04 '23 13:02 stdlib-bot

Thanks for it! As a workaround, you can use

var sin = require( '@stdlib/math/base/special/sin' );
var deg2rad = require( '@stdlib/math/base/special/deg2rad' );
var deg = <val>;
console.log( sin( deg2rad( deg ) ) );

Pranavchiku avatar Feb 04 '23 16:02 Pranavchiku

For reference, there is an existing issue open for this feature request: https://github.com/stdlib-js/stdlib/issues/32. A PR was opened (see https://github.com/stdlib-js/stdlib/pull/487), but IIRC still needs some touch ups.

@Pranavchiku the workaround will work, but, as mentioned in the other issue and PR, such a workaround is likely to have accuracy issues.

kgryte avatar Feb 04 '23 20:02 kgryte