The cumulative distribution function of a random variable
X distributed according to the Binomial distribution has zero slope everywhere except where a jump occurs,
F(x) = P(X ≤ x), given by
F(x) = 
0  for x < 0  Σ_{i=0}^{[x] } C^{n}_{i} p^{ i} (1  p)^{ ni}  for 0 ≤ x ≤ n  1  for x > n 


The corresponding probability point distribution,
f(i), i = 0,...,n, is
f(i) =  C^{n}_{i} p^{ i} (1  p)^{ ni}  for i = 0,...,n  0  elsewhere 


 double Binomial_Cumulative_Distribution( int n, int k, double p )
This function returns F(k) where F(k) is described above.
 double Binomial_Point_Distribution( int n, int k, double p )
This function returns f(k) where f(k) is described above.
 void Binomial_Distribution_Tables( int n, double p, double* pr, double* cumulative )
This function returns f(k) where f(k) is described above for k = 0,...,n in the array pr and returns F(k) where F(k) is described above for k = 0,...,n in the array cumulative.
C source code is available for these routines: