The distribution function of a random variable
X distributed according to the Cauchy distribution is a continuous function,
F(x) = P(X < x), given by
F(x) = 
[ 1 / π ] ∫_{∞}^{x} 1 / (1 + t^{ 2}) dt = 1 / 2 + (1 / π) tan^{ 1}(x)  for ∞ < x < ∞ 


The corresponding probability density function,
f(x) = dF(x)/dx, is
f(x) =  [ 1 / π ] [1 / (1 + x^{ 2})]  for ∞ < x < ∞ 


 double Cauchy_Distribution( double x )
This function returns F(x) where F(x) is described above.
 double Cauchy_Density( double x )
This function returns f(x) where f(x) is described above.
 void Cauchy_Distribution_Tables( double start, double delta, int nsteps, double *density, double* distribution_function )
This function returns f(x) where f(x) is described above in the array density, i.e. density[i] = f(x_{i}) where x_{i} = start + i delta, i = 0,...,nsteps and returns F(x) where F(x) is described above in the array distribution_function, i.e. distribution_function[i] = F(x_{i}) where x_{i} = start + i delta, i = 0,...,nsteps. Note that density must be declared double density[N] where N ≥ nsteps + 1 in the calling routine and similarly the distribution_function must be declared double distribution_function[N] where
N ≥ nsteps + 1 in the calling routine.
C source code is available for these routines: