From 3561330f6bf5174df6c2751f46c47b5f8a5c2e20 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 15 Jun 2024 19:02:20 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 ++ base/special/covercos/README.md | 88 +++++++ .../covercos/benchmark/benchmark.native.js | 60 +++++ .../covercos/benchmark/c/native/Makefile | 146 ++++++++++++ .../covercos/benchmark/c/native/benchmark.c | 136 +++++++++++ base/special/covercos/binding.gyp | 170 ++++++++++++++ base/special/covercos/examples/c/Makefile | 146 ++++++++++++ base/special/covercos/examples/c/example.c | 31 +++ base/special/covercos/include.gypi | 53 +++++ .../stdlib/math/base/special/covercos.h | 41 ++++ base/special/covercos/lib/native.js | 58 +++++ base/special/covercos/manifest.json | 72 ++++++ base/special/covercos/src/Makefile | 70 ++++++ base/special/covercos/src/addon.c | 22 ++ base/special/covercos/src/main.c | 34 +++ base/special/covercos/test/test.native.js | 219 ++++++++++++++++++ 16 files changed, 1369 insertions(+) create mode 100644 base/special/covercos/benchmark/benchmark.native.js create mode 100644 base/special/covercos/benchmark/c/native/Makefile create mode 100644 base/special/covercos/benchmark/c/native/benchmark.c create mode 100644 base/special/covercos/binding.gyp create mode 100644 base/special/covercos/examples/c/Makefile create mode 100644 base/special/covercos/examples/c/example.c create mode 100644 base/special/covercos/include.gypi create mode 100644 base/special/covercos/include/stdlib/math/base/special/covercos.h create mode 100644 base/special/covercos/lib/native.js create mode 100644 base/special/covercos/manifest.json create mode 100644 base/special/covercos/src/Makefile create mode 100644 base/special/covercos/src/addon.c create mode 100644 base/special/covercos/src/main.c create mode 100644 base/special/covercos/test/test.native.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 150683d03..5b7120190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2165,6 +2165,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/covercos](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/covercos) + +
+ +
+ +##### Features + +- [`7b85db8`](https://github.com/stdlib-js/stdlib/commit/7b85db803f6a6bce2999bfe8b2513edb08e15a67) - add C implementation for `math/base/special/covercos` [(##2377)](#2377) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/coversin](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/coversin) @@ -4575,6 +4597,7 @@ A total of 27 people contributed to this release. Thank you to the following con
+- [`7b85db8`](https://github.com/stdlib-js/stdlib/commit/7b85db803f6a6bce2999bfe8b2513edb08e15a67) - **feat:** add C implementation for `math/base/special/covercos` [(##2377)](#2377) _(by Gunj Joshi)_ - [`e7938d9`](https://github.com/stdlib-js/stdlib/commit/e7938d964046b7a61dbc89d23f39daebf4545a47) - **feat:** add C implementation for `math/base/special/cscd` [(##2378)](#2378) _(by Gunj Joshi)_ - [`8304a04`](https://github.com/stdlib-js/stdlib/commit/8304a041c10450a797c64c2fffafc6b0e4bd1a04) - **feat:** add C implementation for `math/base/special/cot` _(by Gunj Joshi, Philipp Burckhardt)_ - [`4c95c5a`](https://github.com/stdlib-js/stdlib/commit/4c95c5ac1cc58e3ed3db0b13a653ad7680a0393a) - **docs:** use descriptive variable names [(##2373)](#2373) _(by Gunj Joshi)_ diff --git a/base/special/covercos/README.md b/base/special/covercos/README.md index cc1697a33..7066daae6 100644 --- a/base/special/covercos/README.md +++ b/base/special/covercos/README.md @@ -93,6 +93,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/covercos.h" +``` + +#### stdlib_base_covercos( x ) + +Computes the [coversed cosine][coversed-cosine] (in radians). + +```c +double out = stdlib_base_covercos( 0.0 ); +// returns 1.0 + +out = stdlib_base_covercos( 3.141592653589793 / 2.0 ); +// returns 2.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_covercos( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/covercos.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_covercos( x[ i ] ); + printf( "covercos(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +