mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.2 KiB
1.2 KiB
| layout |
|---|
| default |
Function composition #
The composition counts of n into k parts.
composition only takes integer arguments. The following condition must be enforced: k <= n.
Syntax #
math.composition(n, k)
Parameters #
| Parameter | Type | Description |
|---|---|---|
n |
Number | BigNumber | Total number of objects in the set |
k |
Number | BigNumber | Number of objects in the subset |
Returns #
| Type | Description |
|---|---|
| Number | BigNumber | Returns the composition counts of n into k parts. |
Examples #
math.composition(5, 3) // returns 6