diff --git a/base/special/coth/README.md b/base/special/coth/README.md index e28daae94..76e1d1e1c 100644 --- a/base/special/coth/README.md +++ b/base/special/coth/README.md @@ -74,6 +74,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/coth.h" +``` + +#### stdlib_base_coth( x ) + +Computes the [hyperbolic cotangent][hyperbolic-functions] of double-precision floating-point number `x`. + +```c +double out = stdlib_base_coth( 2.0 ); +// returns ~1.0373 + +out = stdlib_base_coth( -2.0 ); +// returns ~-1.0373 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_coth( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/coth.h" +#include + +int main( void ) { + const double x[] = { -4.0, -3.11, -2.22, -1.33, -0.44, 0.44, 1.33, 2.22, 3.11, 4.0 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_coth( x[ i ] ); + printf( "coth(%lf) = %lf\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + +