.\" @(#)gamma.3 6.2 (Berkeley) %G% .\" .TH GAMMA 3M "" .AT 3 .SH NAME gamma \- log gamma function .SH SYNOPSIS .nf .B #include .PP .B double gamma(x) .B double x; .fi .SH DESCRIPTION .I Gamma returns ln \||\|\(*G(\||\|\fIx\fR\||\|)\||\|. The sign of \(*G(\||\|\fIx\fR\||\|) is returned in the external integer .IR signgam . The following C program might be used to calculate \(*G: .PP .nf y = gamma(x); if (y > 88.0) error(); y = exp(y); if(signgam) y = \-y; .fi .SH DIAGNOSTICS A huge value is returned for negative integer arguments. .SH BUGS There should be a positive indication of error.