diff --git a/lib/node_modules/@stdlib/math/base/special/gamma1pm1/README.md b/lib/node_modules/@stdlib/math/base/special/gamma1pm1/README.md index ccf18b2874a..108770906da 100644 --- a/lib/node_modules/@stdlib/math/base/special/gamma1pm1/README.md +++ b/lib/node_modules/@stdlib/math/base/special/gamma1pm1/README.md @@ -75,6 +75,91 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/gamma1pm1.h" +``` + +#### stdlib_base_gamma1pm1( x ) + +Computes `gamma(x+1) - 1` without cancellation errors for small `x` and where `gamma(x)` is the [gamma function][@stdlib/math/base/special/gamma]. + +```c +double out = stdlib_base_gamma1pm1( 0.2 ); +// returns ~-0.082 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_gamma1pm1( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/gamma1pm1.h" +#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_gamma1pm1( x[ i ] ); + printf( "gamma1pm1(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +