Files
Upsilon/apps/probability/distribution/hypergeometric_function.h
2019-08-20 17:16:19 +02:00

21 lines
627 B
C

#ifndef PROBABILITY_HYPERGEOMETRIC_FUNCTION_H
#define PROBABILITY_HYPERGEOMETRIC_FUNCTION_H
/* This code can be used to compute the Student distribution for |x| < root(k).
* We do not use it because we want to cover more x, but we keep in case we need
* it later. */
/* hypergeometricFunction(a, b, c, z) = 2F1(a, b, c, z)
* an * bn z^n
* = sum( -------- * --- )
* cn n!
*
* with :
* an = 1 if n = 0
* an = (a*(a+1)*...*(a+n-1) otherwise */
bool hypergeometricFunction(double a, double b, double c, double z, double epsilon, int maxNumberOfIterations, double * result);
#endif