BSD 4_2 development
[unix-history] / usr / man / man3 / gamma.3m
CommitLineData
05dda90f
C
1.TH GAMMA 3M "19 January 1983"
2.SH NAME
3gamma \- log gamma function
4.SH SYNOPSIS
5.nf
6.B #include <math.h>
7.PP
8.B double gamma(x)
9.B double x;
10.fi
11.SH DESCRIPTION
12.I Gamma
13returns ln \||\|\(*G(\||\|\fIx\fR\||\|)\||\|.
14The sign of \(*G(\||\|\fIx\fR\||\|) is returned in the external integer
15.IR signgam .
16The following C program might be used to calculate \(*G:
17.PP
18.nf
19 y = gamma(x);
20 if (y > 88.0)
21 error();
22 y = exp(y);
23 if(signgam)
24 y = \-y;
25.fi
26.SH DIAGNOSTICS
27A huge value is returned for negative integer arguments.
28.SH BUGS
29There should be a positive indication of error.