SootLib
Loading...
Searching...
No Matches
binomial.h File Reference
#include <exception>

Go to the source code of this file.

Functions

double binomial_coefficient (unsigned r, unsigned k)
 

Function Documentation

◆ binomial_coefficient()

double binomial_coefficient ( unsigned  r,
unsigned  k 
)

Josh Bedwell - June 2021

This file holds a binomial coefficient function This function calculates a binomial coefficient efficiently by enumerating several factorials Hardcoded factorials.

Parameters
rinput: r < 35 and r-k < 35
kinput: k < 35 and r-k < 35
Returns
binomal coefficient of r and k

Definition at line 24 of file binomial.h.