From 464809503bd600d69b3eb9e48c6b66ddf84d47eb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 10 Jun 2024 13:07:55 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 ++ base/special/sin/README.md | 85 +++++++ .../special/sin/benchmark/benchmark.native.js | 60 +++++ base/special/sin/benchmark/c/native/Makefile | 146 ++++++++++++ .../sin/benchmark/c/native/benchmark.c | 136 +++++++++++ base/special/sin/binding.gyp | 170 ++++++++++++++ base/special/sin/examples/c/Makefile | 146 ++++++++++++ base/special/sin/examples/c/example.c | 31 +++ base/special/sin/include.gypi | 53 +++++ .../include/stdlib/math/base/special/sin.h | 43 ++++ base/special/sin/lib/native.js | 58 +++++ base/special/sin/manifest.json | 93 ++++++++ base/special/sin/src/Makefile | 70 ++++++ base/special/sin/src/addon.c | 22 ++ base/special/sin/src/main.c | 107 +++++++++ base/special/sin/test/test.native.js | 219 ++++++++++++++++++ 16 files changed, 1462 insertions(+) create mode 100644 base/special/sin/benchmark/benchmark.native.js create mode 100644 base/special/sin/benchmark/c/native/Makefile create mode 100644 base/special/sin/benchmark/c/native/benchmark.c create mode 100644 base/special/sin/binding.gyp create mode 100644 base/special/sin/examples/c/Makefile create mode 100644 base/special/sin/examples/c/example.c create mode 100644 base/special/sin/include.gypi create mode 100644 base/special/sin/include/stdlib/math/base/special/sin.h create mode 100644 base/special/sin/lib/native.js create mode 100644 base/special/sin/manifest.json create mode 100644 base/special/sin/src/Makefile create mode 100644 base/special/sin/src/addon.c create mode 100644 base/special/sin/src/main.c create mode 100644 base/special/sin/test/test.native.js 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 ); + } +} +``` + +
+ + + +
+ + +