X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgsl-extras%2Fhypergeometric.c;h=67b757b2f93d6a0389d13b004c0df4b9dbc7a31e;hb=2da08e801be698df268f35ac6e21cc8a345ba1fb;hp=ce8677718d8106da43acfc3e64976a938e93b7b3;hpb=ebccf00cbddbcadb5883fa98ddbccbea67642295;p=pspp-builds.git diff --git a/lib/gsl-extras/hypergeometric.c b/lib/gsl-extras/hypergeometric.c index ce867771..67b757b2 100644 --- a/lib/gsl-extras/hypergeometric.c +++ b/lib/gsl-extras/hypergeometric.c @@ -1,7 +1,7 @@ /* cdf/hypergeometric.c * * Copyright (C) 2004 Free Software Foundation, Inc. - * Written by Jason H. Stover. + * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ * * References: * - * T. Wu. An accurate computation of the hypergeometric distribution + * T. Wu. An accurate computation of the hypergeometric distribution * function. ACM Transactions on Mathematical Software. Volume 19, number 1, * March 1993. * This algorithm is not used, since it requires factoring the @@ -38,7 +38,7 @@ * time than the algorithm used here. * * W. Feller. An Introduction to Probability Theory and Its Applications, - * third edition. 1968. Chapter 2, section 6. + * third edition. 1968. Chapter 2, section 6. */ #include #include @@ -51,7 +51,7 @@ * Pr (X <= k) */ double -gslextras_cdf_hypergeometric_P (const unsigned int k, +gslextras_cdf_hypergeometric_P (const unsigned int k, const unsigned int n0, const unsigned int n1, const unsigned int t) @@ -125,7 +125,7 @@ gslextras_cdf_hypergeometric_P (const unsigned int k, * Pr (X > k) */ double -gslextras_cdf_hypergeometric_Q (const unsigned int k, +gslextras_cdf_hypergeometric_Q (const unsigned int k, const unsigned int n0, const unsigned int n1, const unsigned int t) @@ -153,7 +153,7 @@ gslextras_cdf_hypergeometric_Q (const unsigned int k, P = 0.0; mode = (int) t*n0 / (n0+n1); relerr = 1.0; - + if(k < mode) { i = mode;