From 234c6c3261313ab8f60c3211bc77fa21741664f7 Mon Sep 17 00:00:00 2001
From: Adarsh Palaskar <83298237+adarshpalaskar1@users.noreply.github.com>
Date: Sat, 2 Mar 2024 22:31:36 +0530
Subject: [PATCH] feat: add C implementation for `math/base/special/acovercos`
PR-URL: #1446
Closes: #775
---------
Signed-off-by: Pranav <85227306+Pranavchiku@users.noreply.github.com>
Co-authored-by: Pranav <85227306+Pranavchiku@users.noreply.github.com>
Reviewed-by: Pranav <85227306+Pranavchiku@users.noreply.github.com>
---
.../math/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 ++++++++++++++
.../math/base/special/acovercos/binding.gyp | 170 ++++++++++++++++++
.../special/acovercos/examples/c/Makefile | 146 +++++++++++++++
.../special/acovercos/examples/c/example.c | 31 ++++
.../math/base/special/acovercos/include.gypi | 53 ++++++
.../stdlib/math/base/special/acovercos.h | 38 ++++
.../math/base/special/acovercos/lib/native.js | 58 ++++++
.../math/base/special/acovercos/manifest.json | 72 ++++++++
.../math/base/special/acovercos/src/Makefile | 70 ++++++++
.../math/base/special/acovercos/src/addon.c | 23 +++
.../math/base/special/acovercos/src/main.c | 34 ++++
.../special/acovercos/test/test.native.js | 126 +++++++++++++
15 files changed, 1249 insertions(+), 1 deletion(-)
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/benchmark/benchmark.native.js
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/benchmark/c/native/Makefile
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/benchmark/c/native/benchmark.c
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/binding.gyp
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/examples/c/Makefile
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/examples/c/example.c
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/include.gypi
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/include/stdlib/math/base/special/acovercos.h
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/lib/native.js
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/manifest.json
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/src/Makefile
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/src/addon.c
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/src/main.c
create mode 100644 lib/node_modules/@stdlib/math/base/special/acovercos/test/test.native.js
diff --git a/lib/node_modules/@stdlib/math/base/special/acovercos/README.md b/lib/node_modules/@stdlib/math/base/special/acovercos/README.md
index a13c11d9a36..3b3a3eae87c 100644
--- a/lib/node_modules/@stdlib/math/base/special/acovercos/README.md
+++ b/lib/node_modules/@stdlib/math/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 );
+ }
+}
+```
+
+
+
+
+
+
+
+
+