From 16ccd14c04d952b29b29f54acf3d9359046ef1a3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Mar 2024 17:03:35 +0000 Subject: [PATCH] Auto-generated commit --- base/special/acovercos/README.md | 87 ++++++++- .../acovercos/benchmark/benchmark.native.js | 60 +++++++ .../acovercos/benchmark/c/native/Makefile | 146 +++++++++++++++ .../acovercos/benchmark/c/native/benchmark.c | 136 ++++++++++++++ base/special/acovercos/binding.gyp | 170 ++++++++++++++++++ base/special/acovercos/examples/c/Makefile | 146 +++++++++++++++ base/special/acovercos/examples/c/example.c | 31 ++++ base/special/acovercos/include.gypi | 53 ++++++ .../stdlib/math/base/special/acovercos.h | 38 ++++ base/special/acovercos/lib/native.js | 58 ++++++ base/special/acovercos/manifest.json | 72 ++++++++ base/special/acovercos/src/Makefile | 70 ++++++++ base/special/acovercos/src/addon.c | 23 +++ base/special/acovercos/src/main.c | 34 ++++ base/special/acovercos/test/test.native.js | 126 +++++++++++++ 15 files changed, 1249 insertions(+), 1 deletion(-) create mode 100644 base/special/acovercos/benchmark/benchmark.native.js create mode 100644 base/special/acovercos/benchmark/c/native/Makefile create mode 100644 base/special/acovercos/benchmark/c/native/benchmark.c create mode 100644 base/special/acovercos/binding.gyp create mode 100644 base/special/acovercos/examples/c/Makefile create mode 100644 base/special/acovercos/examples/c/example.c create mode 100644 base/special/acovercos/include.gypi create mode 100644 base/special/acovercos/include/stdlib/math/base/special/acovercos.h create mode 100644 base/special/acovercos/lib/native.js create mode 100644 base/special/acovercos/manifest.json create mode 100644 base/special/acovercos/src/Makefile create mode 100644 base/special/acovercos/src/addon.c create mode 100644 base/special/acovercos/src/main.c create mode 100644 base/special/acovercos/test/test.native.js diff --git a/base/special/acovercos/README.md b/base/special/acovercos/README.md index ee64b44b5..9c7efb5f6 100644 --- a/base/special/acovercos/README.md +++ b/base/special/acovercos/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2024 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -105,6 +105,91 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/acovercos.h" +``` + +#### stdlib_base_acovercos( x ) + +Computes the [inverse coversed cosine][inverse-coversed-cosine] of a double-precision floating-point number. + +```c +double out = stdlib_base_acovercos( -3.141592653589793/2.0 ); +// returns ~-0.6075 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_acovercos( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/acovercos.h" +#include + +int main( void ) { + const double x[] = { -2.0, -1.80, -1.78, -1.67, -0.56, -0.27, -1.67, -0.78, -1.89, 0.0 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_acovercos( x[ i ] ); + printf( "acovercos(%lf) = %lf\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + +