GAMMA(3M) — UNIX 3.0
NAME
gamma − log gamma function
SYNOPSIS
#include <math.h>
extern int signgam;
double gamma (x)
double x;
DESCRIPTION
Gamma returns ln|Γ(|x|)|. The sign of Γ(|x|) is returned in the external integer signgam. The following C program fragment might be used to calculate Γ:
y = gamma (x);
if (y > 88.0)
error ();
y = exp (y) ∗ signgam;
DIAGNOSTICS
For negative integer arguments, a huge value is returned, and errno is set to EDOM.
May 16, 1980