diff --git a/lib/node_modules/@stdlib/math/base/special/factorial/README.md b/lib/node_modules/@stdlib/math/base/special/factorial/README.md index fd4684a629f..c4a0659cf4b 100644 --- a/lib/node_modules/@stdlib/math/base/special/factorial/README.md +++ b/lib/node_modules/@stdlib/math/base/special/factorial/README.md @@ -151,6 +151,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/factorial.h" +``` + +#### stdlib_base_factorial( x ) + +Evaluates the [factorial][factorial-function] function. + +```c +double out = stdlib_base_factorial( 3.0 ); +// returns 6.0 + +out = stdlib_base_factorial( -1.5 ); +// returns ~-3.545 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_factorial( const double n ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/factorial.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_factorial( x[ i ] ); + printf( "factorial(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +