# Function num_integer::binomial [−] [src]

    pub fn binomial<T: Integer + Clone>(n: T, k: T) -> T

Calculate the binomial coefficient.

Note that this might overflow, depending on `T`. For the primitive integer types, the following n are the largest ones possible such that there will be no overflow for any k:

type | n
--- | ---
u8 | 10
i8 | 9
u16 | 18
i16 | 17
u32 | 34
i32 | 33
u64 | 67
i64 | 66

For larger n, consider using a bigint type for `T`.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)