<commit_before># Binomial Coefficient

> Compute the [binomial coefficient][binomial-coefficient].


<section class="intro">

The [binomial coefficient][binomial-coefficient] of two nonnegative integers `n` and `k` is defined as

<!-- <equation class="equation" label="eq:binomial_coefficient" align="center" raw="\binom {n}{k} = \frac{n!}{k!\,(n-k)!} \quad \text{for }\ 0\leq k\leq n" alt="Factorial formula for the Binomial coefficient."> -->

<div class="equation" align="center" data-raw-text="
    \binom {n}{k} = \frac{n!}{k!\,(n-k)!} \quad \text{for }\ 0\leq k\leq n" data-equation="eq:binomial_coefficient">
    <img src="" alt="Factorial formula for the binomial coefficient.">
    <br>
</div>

<!-- </equation> -->

The [binomial coefficient][binomial-coefficient] can be generalized to negative integers `n` as follows:

<!-- <equation class="equation" label="eq:binomial_coefficient_negative_integers" align="center" raw="\binom {n}{k} = (-1)^{k}\left(\!\!{\binom {n}{k}}\!\!\right)" alt="Generalization of the binomial coefficient to negative n."> -->

<div class="equation" align="center" data-raw-text="
    \binom {-n}{k} = (-1)^{k}\left(\!\!{\binom {n}{k}}\!\!\right)" data-equation="eq:binomial_coefficient_negative_integers">
    <img src="" alt="Generalization of the binomial coefficient to negative n.">
    <br>
</div>

<!-- </equation> -->

</section>

<!-- /.intro -->


<section class="usage">

## Usage

``` javascript
var binomcoef = require( '@stdlib/math/base/special/binomcoef' );
```

#### binomcoef( n, k )

Evaluates the [binomial coefficient][binomial-coefficient] of two integers `n` and `k`.

``` javascript
var v = binomcoef( 8, 2 );
// returns 28

v = binomcoef( 0, 0 );
// returns 1

v = binomcoef( -4, 2 );<commit_msg>Fix equations<commit_after># Binomial Coefficient

> Compute the [binomial coefficient][binomial-coefficient].


<section class="intro">

The [binomial coefficient][binomial-coefficient] of two nonnegative integers `n` and `k` is defined as

<!-- <equation class="equation" label="eq:binomial_coefficient" align="center" raw="\binom {n}{k} = \frac{n!}{k!\,(n-k)!} \quad \text{for }\ 0\leq k\leq n" alt="Factorial formula for the Binomial coefficient."> -->

<div class="equation" align="center" data-raw-text="\binom {n}{k} = \frac{n!}{k!\,(n-k)!} \quad \text{for }\ 0\leq k\leq n" data-equation="eq:binomial_coefficient">
    <img src="" alt="Factorial formula for the binomial coefficient.">
    <br>
</div>

<!-- </equation> -->

The [binomial coefficient][binomial-coefficient] can be generalized to negative integers `n` as follows:

<!-- <equation class="equation" label="eq:binomial_coefficient_negative_integers" align="center" raw="\binom {-n}{k} = (-1)^{k} \binom{n + k - 1}{k} = (-1)^{k} \left(\!\!{\binom {n}{k}}\!\!\right)" alt="Generalization of the binomial coefficient to negative n."> -->

<div class="equation" align="center" data-raw-text="\binom {-n}{k} = (-1)^{k} \binom{n + k - 1}{k} = (-1)^{k} \left(\!\!{\binom {n}{k}}\!\!\right)" data-equation="eq:binomial_coefficient_negative_integers">
    <img src="" alt="Generalization of the binomial coefficient to negative n.">
    <br>
</div>

<!-- </equation> -->

</section>

<!-- /.intro -->


<section class="usage">

## Usage

``` javascript
var binomcoef = require( '@stdlib/math/base/special/binomcoef' );
```

#### binomcoef( n, k )

Evaluates the [binomial coefficient][binomial-coefficient] of two integers `n` and `k`.

``` javascript
var v = binomcoef( 8, 2 );
// returns 28

v = binomcoef( 0, 0 );
// returns 1

v = binomcoef( -4, 2 );
{'fraction_non_alphanumeric': 0.2095104895104895, 'fraction_numerical': 0.008391608391608392, 'mean_word_length': 4.426403641881639, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '136974', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1197, 'n_words': 319}