From 9021e7449f3986f513cb6e546070593529ac0bdc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 15 Mar 2024 14:33:28 +0000 Subject: [PATCH] Auto-generated commit --- base/special/acsc/README.md | 85 +++++++++ .../acsc/benchmark/benchmark.native.js | 60 +++++++ base/special/acsc/benchmark/c/native/Makefile | 146 +++++++++++++++ .../acsc/benchmark/c/native/benchmark.c | 136 ++++++++++++++ base/special/acsc/binding.gyp | 170 ++++++++++++++++++ base/special/acsc/examples/c/Makefile | 146 +++++++++++++++ base/special/acsc/examples/c/example.c | 31 ++++ base/special/acsc/include.gypi | 53 ++++++ .../include/stdlib/math/base/special/acsc.h | 38 ++++ base/special/acsc/lib/native.js | 58 ++++++ base/special/acsc/manifest.json | 72 ++++++++ base/special/acsc/src/Makefile | 70 ++++++++ base/special/acsc/src/addon.c | 23 +++ base/special/acsc/src/main.c | 34 ++++ base/special/acsc/test/test.native.js | 132 ++++++++++++++ 15 files changed, 1254 insertions(+) create mode 100644 base/special/acsc/benchmark/benchmark.native.js create mode 100644 base/special/acsc/benchmark/c/native/Makefile create mode 100644 base/special/acsc/benchmark/c/native/benchmark.c create mode 100644 base/special/acsc/binding.gyp create mode 100644 base/special/acsc/examples/c/Makefile create mode 100644 base/special/acsc/examples/c/example.c create mode 100644 base/special/acsc/include.gypi create mode 100644 base/special/acsc/include/stdlib/math/base/special/acsc.h create mode 100644 base/special/acsc/lib/native.js create mode 100644 base/special/acsc/manifest.json create mode 100644 base/special/acsc/src/Makefile create mode 100644 base/special/acsc/src/addon.c create mode 100644 base/special/acsc/src/main.c create mode 100644 base/special/acsc/test/test.native.js diff --git a/base/special/acsc/README.md b/base/special/acsc/README.md index 2e214b822..45b4d50a9 100644 --- a/base/special/acsc/README.md +++ b/base/special/acsc/README.md @@ -75,6 +75,91 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/acsc.h" +``` + +#### stdlib_base_acsc( x ) + +Computes the [arccosecant][arccosecant] of `x`. + +```c +double out = stdlib_base_acsc( 1.0 ); +// returns ~1.57 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_acsc( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/acsc.h" +#include + +int main( void ) { + const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_acsc( x[ i ] ); + printf( "acsc(%lf) = %lf\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + +