From 07005bd41a1b600d8a8415f6e4256202bdb41fa5 Mon Sep 17 00:00:00 2001 From: Pranavchiku Date: Tue, 30 Jan 2024 21:33:25 +0530 Subject: [PATCH 01/26] enh: document c api in readme --- .../@stdlib/math/base/special/acsc/README.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/lib/node_modules/@stdlib/math/base/special/acsc/README.md b/lib/node_modules/@stdlib/math/base/special/acsc/README.md index cfdb5ca58753..1f958017bbc4 100644 --- a/lib/node_modules/@stdlib/math/base/special/acsc/README.md +++ b/lib/node_modules/@stdlib/math/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 a double-precision floating-point number. + +```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_asc( x[ i ] ); + printf( "acsc(%lf) = %lf\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + +