contrib/mul/mbl/mbl_gamma.h
Go to the documentation of this file.
00001 #ifndef mbl_gamma_h
00002 #define mbl_gamma_h
00003 //:
00004 // \file
00005 // \author Tim Cootes
00006 // \date 18-Apr-2001
00007 // \brief Gamma and Incomplete Gamma functions
00008 
00009 //: log of Gamma function of a
00010 double mbl_log_gamma(double a);
00011 
00012 //: Incomplete gamma function, P(a,x)
00013 double mbl_gamma_p(double a, double x);
00014 
00015 //:Incomplete gamma function, Q(a,x)
00016 double mbl_gamma_q(double a, double x);
00017 
00018 //: log of Incomplete gamma function, Q(a,x)
00019 double mbl_log_gamma_q(double a, double x);
00020 
00021 //: The Error function
00022 // erf(x) = (2/sqrt(pi)) Integral from 0 to x (exp(-t^2) dt)
00023 inline double mbl_erf(double x)
00024 { return (x<0)?-mbl_gamma_p(0.5,x*x):mbl_gamma_p(0.5,x*x); }
00025 
00026 #endif // mbl_gamma_h