The cumulative distribution function of a random variable
X distributed according to the geometric distribution has zero slope everywhere except where a jump occurs,
F(k) = P(X ≤ k), given by
F(k) = 
1  (1  p)^{ k+1}  for k = 0,1,... 


The corresponding probability point distribution,
f(k), k = 0,..., is
f(k) =  p (1  p)^{ k}  for k = 0,... 


 double Geometric_Cumulative_Distribution( int k, double p )
This function returns F(k) where F(k) is described above.
 double Geometric_Point_Distribution( int k, double p )
This function returns f(k) where f(k) is described above.
 void Geometric_Distribution_Tables( int size, 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: