mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
806 B
806 B
Function multinomial
Computes the sum taken over all combinations of nonnegative integers such that the sum of all indices is n.
Multinomial only takes an array of integers greater than or equal to 0.
Syntax
math.multinomial(array)
Parameters
| Parameter | Type | Description |
|---|---|---|
array |
Array | | An array of all integers to find the sum of all combinations |
Returns
| Type | Description |
|---|---|
| Number | BigNumber | Computed sum |
Examples
math.multinomial([2,0,1]); // returns 3