diff --git a/CHANGELOG.md b/CHANGELOG.md index 970099721..2478c3f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-08-01) +## Unreleased (2024-08-02)
@@ -3755,6 +3755,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/gammaln](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gammaln) + +
+ +
+ +##### Features + +- [`d745814`](https://github.com/stdlib-js/stdlib/commit/d74581415b30604ce6db2b3a2c4f242040eb3e8e) - add C implementation for `math/base/special/gammaln` [(#2636)](https://github.com/stdlib-js/stdlib/pull/2636) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/gammasgn](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gammasgn) @@ -5730,6 +5752,7 @@ A total of 30 people contributed to this release. Thank you to the following con
+- [`d745814`](https://github.com/stdlib-js/stdlib/commit/d74581415b30604ce6db2b3a2c4f242040eb3e8e) - **feat:** add C implementation for `math/base/special/gammaln` [(#2636)](https://github.com/stdlib-js/stdlib/pull/2636) _(by Gunj Joshi)_ - [`eb7f8ed`](https://github.com/stdlib-js/stdlib/commit/eb7f8ed40d9a514a673f5152484f62042dc24e67) - **docs:** add missing `stdint` includes [(#2728)](https://github.com/stdlib-js/stdlib/pull/2728) _(by Gunj Joshi, Athan Reines)_ - [`46cda32`](https://github.com/stdlib-js/stdlib/commit/46cda325a622274755194c2dd6415d3d04ab5a5b) - **feat:** add `LL_D` in `math/base/napi/binary` [(#2726)](https://github.com/stdlib-js/stdlib/pull/2726) _(by Gunj Joshi, Athan Reines)_ - [`9816dec`](https://github.com/stdlib-js/stdlib/commit/9816dece59ddf974693cf1626f3b5823d652e3c4) - **bench:** fix description [(#2709)](https://github.com/stdlib-js/stdlib/pull/2709) _(by Gunj Joshi)_ diff --git a/base/special/gammaln/README.md b/base/special/gammaln/README.md index b645aad9f..497e0d856 100644 --- a/base/special/gammaln/README.md +++ b/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 ); + } +} +``` + +
+ + + +
+ + +