Simard, Richard, and Pierre L’Ecuyer. “Computing the Two-Sided Kolmogorov-Smirnov Distribution”.
Journal of Statistical Software
, vol. 39, no. 11, Mar. 2011, pp. 1-18, doi:10.18637/jss.v039.i11.