[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    lgamma(3M) manual page Table of Contents

Name

lgamma, lgamma_r, gamma, gamma_r - log gamma function

Synopsis

cc [ flag ... ] file ... -lm [ library ... ]

#include <math.h>

extern int signgam;

double lgamma(double x);

double lgamma_r(double x, int *signgamp);

MT-Level

See the NOTES section of this page.

Description

Both lgamma() and lgamma_r() return

    ln|*G(x)|
where
    *G(x) = integral from 0 to +Infinity of pow(t,x-1)*exp(-t) dt
for x > 0 and
    *G(x) = *p/(*G(1-x)sin(*px))
for x < 1.
}