diff --git a/lib/node_modules/@stdlib/math/base/special/gammaln/README.md b/lib/node_modules/@stdlib/math/base/special/gammaln/README.md index 58c41b37dde4..4d66fd2c6276 100644 --- a/lib/node_modules/@stdlib/math/base/special/gammaln/README.md +++ b/lib/node_modules/@stdlib/math/base/special/gammaln/README.md @@ -83,6 +83,95 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/gammaln.h" +``` + +#### stdlib_base_gammaln( x ) + +Evaluates the [natural logarithm][@stdlib/math/base/special/ln] of the [gamma function][@stdlib/math/base/special/gamma]. + +```c +double out = stdlib_base_gammaln( 2.0 ); +// returns 0.0 + +out = stdlib_base_gammaln( 4.0 ); +// returns ~1.792 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_gammaln( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/gammaln.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_gammaln( x[ i ] ); + printf( "gammaln(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +