diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a7d3d5f7..49121461e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-08-09) +## Unreleased (2024-08-11)
@@ -893,6 +893,7 @@ This release closes the following issue: ##### Features +- [`5b184b6`](https://github.com/stdlib-js/stdlib/commit/5b184b681a3d1d5c3fea30b9d8f4630c86eb44af) - add C implementation for `math/base/special/binomcoefln` - [`06b8011`](https://github.com/stdlib-js/stdlib/commit/06b80119890e1868578ba4904e9efaa071b27b05) - add C implementation for `math/base/special/binomcoef` - [`6e4b9eb`](https://github.com/stdlib-js/stdlib/commit/6e4b9ebc31d9629446019e37e31bfe9b180b675c) - update namespace TypeScript declarations [(#2681)](https://github.com/stdlib-js/stdlib/pull/2681) - [`c77f866`](https://github.com/stdlib-js/stdlib/commit/c77f866c93006ba4bf73221cb28c94c23195ca06) - add C implementation for `math/base/special/binet` [(#2653)](https://github.com/stdlib-js/stdlib/pull/2653) @@ -5917,6 +5918,7 @@ A total of 30 people contributed to this release. Thank you to the following con
+- [`5b184b6`](https://github.com/stdlib-js/stdlib/commit/5b184b681a3d1d5c3fea30b9d8f4630c86eb44af) - **feat:** add C implementation for `math/base/special/binomcoefln` _(by Gunj Joshi, Philipp Burckhardt)_ - [`b224509`](https://github.com/stdlib-js/stdlib/commit/b2245099fc615230ea5a6d3dd28dc7626634bdab) - **feat:** add `F_I` macro to `math/base/napi/unary` [(#2768)](https://github.com/stdlib-js/stdlib/pull/2768) _(by Gunj Joshi)_ - [`140b517`](https://github.com/stdlib-js/stdlib/commit/140b5172075f08678b84b5f92b7feeacfc777119) - **feat:** add `math/base/assert/is-integerf` _(by Gunj Joshi, Philipp Burckhardt)_ - [`2837436`](https://github.com/stdlib-js/stdlib/commit/283743652091fff85f01746b9edf8da3d5286cf5) - **docs:** update license header in `math/base/special/gamma1pm1` [(#2764)](https://github.com/stdlib-js/stdlib/pull/2764) _(by Gunj Joshi)_ diff --git a/base/special/binomcoefln/README.md b/base/special/binomcoefln/README.md index bcc823735..7b2609456 100644 --- a/base/special/binomcoefln/README.md +++ b/base/special/binomcoefln/README.md @@ -83,7 +83,7 @@ var binomcoefln = require( '@stdlib/math/base/special/binomcoefln' ); #### binomcoefln( n, k ) -Evaluates the [binomial coefficient][binomial-coefficient] of two integers `n` and `k`. +Evaluates the natural logarithm of the [binomial coefficient][binomial-coefficient] of two integers `n` and `k`. ```javascript var v = binomcoefln( 8, 2 ); @@ -158,6 +158,95 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/binomcoefln.h" +``` + +#### stdlib_base_binomcoefln( n, k ) + +Evaluates the natural logarithm of the [binomial coefficient][binomial-coefficient] of two integers `n` and `k`. + +```c +double v = stdlib_base_binomcoefln( 8, 2 ); +// returns ~3.332 +``` + +The function accepts the following arguments: + +- **n**: `[in] int64_t` input value. +- **k**: `[in] int64_t` input value. + +```c +double stdlib_base_binomcoefln( const int64_t n, const int64_t k ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/binomcoefln.h" +#include +#include +#include + +int main( void ) { + const int64_t a[] = { 24, 32, 48, 116, 33 }; + const int64_t b[] = { 12, 6, 15, 52, 22 }; + + double out; + int i; + for ( i = 0; i < 5; i++ ) { + out = stdlib_base_binomcoef( a[ i ], b[ i ] ); + printf( "binomcoefln(%" PRId64 ", %" PRId64 ") = %lf\n", a[ i ], b[ i ], out ); + } +} +``` + +
+ + + +
+ + +