GAMMA(3M) — System Interface Manual — 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);
if (y > 706.0)
error();
y = exp(y);
if(signgam)
y = −y;
Note that exp for arguments greater than 706.0 produce an infinite result in IEEE double-precision floating-point format.
DIAGNOSTICS
A huge value is returned for negative integer arguments.
BUGS
There should be a positive indication of error.
Sun System Release 0.3 — 26 April 1983