diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc3b0dd3..4b0ad41ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3894,6 +3894,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/sin](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/sin) + +
+ +
+ +##### Features + +- [`ddf4bdb`](https://github.com/stdlib-js/stdlib/commit/ddf4bdb3e92d8817fa57bdefe8d375f40b4abdfa) - add C implementation for `math/base/special/sin` + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/sinh](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/sinh) @@ -4396,6 +4418,7 @@ A total of 24 people contributed to this release. Thank you to the following con
+- [`ddf4bdb`](https://github.com/stdlib-js/stdlib/commit/ddf4bdb3e92d8817fa57bdefe8d375f40b4abdfa) - **feat:** add C implementation for `math/base/special/sin` _(by Gunj Joshi, Philipp Burckhardt)_ - [`b6edfd8`](https://github.com/stdlib-js/stdlib/commit/b6edfd8f1953792320b89f18ff4d059dceec3631) - **feat:** add `math/base/special/lnf` _(by Gunj Joshi, Philipp Burckhardt)_ - [`0b633eb`](https://github.com/stdlib-js/stdlib/commit/0b633eb2afe0641b963621048a3ce93795c8d92b) - **feat:** add C implementation for `math/base/special/rempio2` _(by Gunj Joshi, Philipp Burckhardt, Athan Reines)_ - [`1b5abe6`](https://github.com/stdlib-js/stdlib/commit/1b5abe6cb97ca371aeeae5ef5e39e9ef20898e52) - **chore:** update package meta data [(#2344)](https://github.com/stdlib-js/stdlib/pull/2344) _(by stdlib-bot, Athan Reines)_ diff --git a/base/special/sin/README.md b/base/special/sin/README.md index 1268263e0..39c9d71d5 100644 --- a/base/special/sin/README.md +++ b/base/special/sin/README.md @@ -72,6 +72,91 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/sin.h" +``` + +#### stdlib_base_sin( x ) + +Computes the [sine][sine] of a `number` (in radians). + +```c +double y = stdlib_base_sin( 3.141592653589793 / 2.0 ); +// returns ~1.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_sin( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/sin.h" +#include + +int main( void ) { + const double x[] = { 0.0, 0.523, 0.785, 1.047, 3.14 }; + + double y; + int i; + for ( i = 0; i < 5; i++ ) { + y = stdlib_base_sin( x[ i ] ); + printf( "sin(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +