diff --git a/lib/node_modules/@stdlib/math/base/special/gamma/README.md b/lib/node_modules/@stdlib/math/base/special/gamma/README.md index 9497ef59428..44494ffeacd 100644 --- a/lib/node_modules/@stdlib/math/base/special/gamma/README.md +++ b/lib/node_modules/@stdlib/math/base/special/gamma/README.md @@ -121,6 +121,95 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/gamma.h" +``` + +#### stdlib_base_gamma( x ) + +Evaluates the [gamma function][gamma-function]. + +```c +double out = stdlib_base_gamma( 4.0 ); +// returns 6.0 + +out = stdlib_base_gamma( -1.5 ); +// returns ~2.363 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_gamma( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/gamma.h" +#include +#include + +int main( void ) { + const double x[] = { 4.0, -1.5, -0.5, 0.5 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_gamma( x[ i ] ); + printf( "gamma(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +