Special Functions

C code

Gamma Function

gamma function Gamma(a), incomplete gamma function P(a,x) and its complement Q(a,x)=1-P(a,x). C code are copied from Ref. [1]

gammln.c returns ln Gamma (x)

gammp.c returns P(a,x)

gammq.c returns Q(a,x)

gammp.c and gammq.c use these two source files

gcf.c

gser.c

This main.c program together with above functions do tests using values "a x" stored in a file "input".

main.c

References:

[1] Numerical Recipes in C, W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Cambridge University Press, 1992