diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eaa5d0a7..5f65ca212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3115,6 +3115,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/factorialln](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/factorialln) + +
+ +
+ +##### Features + +- [`1c43f05`](https://github.com/stdlib-js/stdlib/commit/1c43f05a04d6731ea7d1b93f89179da216259005) - add C implementation for `math/base/special/factorialln` [(#2731)](https://github.com/stdlib-js/stdlib/pull/2731 ) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/fast/abs](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/fast/abs) @@ -5775,6 +5797,7 @@ A total of 30 people contributed to this release. Thank you to the following con
+- [`1c43f05`](https://github.com/stdlib-js/stdlib/commit/1c43f05a04d6731ea7d1b93f89179da216259005) - **feat:** add C implementation for `math/base/special/factorialln` [(#2731)](https://github.com/stdlib-js/stdlib/pull/2731 ) _(by Gunj Joshi)_ - [`b633157`](https://github.com/stdlib-js/stdlib/commit/b6331572f8cc0dcd92ac1dbeb0aeaabc4d858615) - **docs:** remove comments, set `isNegative` to `uint8_t` in `math/base/special/gammaln` [(#2732)](https://github.com/stdlib-js/stdlib/pull/2732) _(by Gunj Joshi)_ - [`759e667`](https://github.com/stdlib-js/stdlib/commit/759e6676d54a121a5458edbe0f6caa541c465001) - **feat:** add C implementation for `math/base/special/sinc` _(by Gunj Joshi)_ - [`06b8011`](https://github.com/stdlib-js/stdlib/commit/06b80119890e1868578ba4904e9efaa071b27b05) - **feat:** add C implementation for `math/base/special/binomcoef` _(by Gunj Joshi)_ diff --git a/base/special/factorialln/README.md b/base/special/factorialln/README.md index 9c6d2ba52..b592aa2e8 100644 --- a/base/special/factorialln/README.md +++ b/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 ); + } +} +``` + +
+ + + +
+ + +