add cdf function

this adds a cdf function, code was liberated form http://www.math.ucla.edu/~tom/distributions/chisq.html