Skip to main content

binomial_checked

Function binomial_checked 

Source
pub fn binomial_checked(
    n: u64,
    k: u64,
    max_iter: u64,
) -> Result<BigUint, CombError>
Expand description

n choose k with an explicit ceiling on the effective loop length (min(k, n - k)).

Returns CombError::LimitExceeded when min(k, n - k) exceeds max_iter instead of folding a k-length big-integer product from untrusted input.