Manual Page Result
0
Command: gamma | Section: 3 | Source: UNIX v10 | File: gamma.3
GAMMA(3M) GAMMA(3M)
NAME
gamma - log gamma function
SYNOPSIS
#include <math.h>
double gamma(x)
double x;
extern int signgam;
DESCRIPTION
Gamma returns ln |<Gamma>(x)|. The sign of <Gamma>(x) is returned in
the external integer signgam.
EXAMPLES
Computation of the gamma function:
errno = 0;
y = gamma(x);
if(errno || (y > 88.0))
error();
y = signgam*exp(y);
DIAGNOSTICS
A large value is returned for negative integer arguments and errno is
set to EDOM.
BUGS
There should be a positive indication of error.
The name should indicate the answer is a logarithm, perhaps lgamma.
GAMMA(3M)