GAMMA(3M) — MATHEMATICAL FUNCTIONS
NAME
gamma − log gamma function
SYNOPSIS
#include <math.h>
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 might be used to calculate Γ:
y = gamma(x);
#ifdef vax
if (y > 88.0)
#endif
#ifdef sun
if (y > 706.0)
#endif
error();
y = exp(y);
if(signgam)
y = −y;
DIAGNOSTICS
A huge value is returned for negative integer arguments.
BUGS
There should be a positive indication of error.
Sun Release 2.0 — Last change: 23 August 1983