File:  [CSRG BSD Unix] / 43BSDReno / old / libm / man / gamma.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.\"	@(#)gamma.3	6.1 (Berkeley) 5/15/85
.\"
.TH GAMMA 3M  "May 15, 1985"
.AT 3
.SH NAME
gamma \- log gamma function
.SH SYNOPSIS
.nf
.B #include <math.h>
.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.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.