diff --git a/lib/node_modules/@stdlib/math/base/special/factorialln/README.md b/lib/node_modules/@stdlib/math/base/special/factorialln/README.md index 493761f9ca27..b3f12b55081b 100644 --- a/lib/node_modules/@stdlib/math/base/special/factorialln/README.md +++ b/lib/node_modules/@stdlib/math/base/special/factorialln/README.md @@ -166,6 +166,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/factorialln.h" +``` + +#### stdlib_base_factorialln( x ) + +Evaluates the natural logarithm of the [factorial function][factorial-function]. For input values other than negative integers, the function returns `ln( x! ) = ln( Γ(x+1) )`, where `Γ` is the [Gamma][gamma-function] function. For negative integers, the function returns `NaN`. + +```c +double out = stdlib_base_factorialln( 3.0 ); +// returns ~1.792 + +out = stdlib_base_factorialln( -1.5 ); +// returns ~1.266 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_factorialln( const double n ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/factorialln.h" +#include + +int main( void ) { + const double x[] = { 2.0, 3.0, 5.0, 8.0 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_factorialln( x[ i ] ); + printf( "factorialln(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +