]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/gamma.3
Removed HISTORY section, or moved it as a subsection or paragraphs
[thirdparty/man-pages.git] / man3 / gamma.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\"
4 .\" Modified 2003-11-18, aeb: historical remarks
5 .\"
6 .TH GAMMA 3 2002-08-10 "GNU" "Linux Programmer's Manual"
7 .SH NAME
8 gamma, gammaf, gammal \- (logarithm of the) gamma function
9 .SH SYNOPSIS
10 .B #include <math.h>
11 .sp
12 .BI "double gamma(double " x ");"
13 .br
14 .BI "float gammaf(float " x ");"
15 .br
16 .BI "long double gammal(long double " x ");"
17 .sp
18 Link with \-lm.
19 .SH DESCRIPTION
20 For the definition of the Gamma function, see
21 .BR tgamma (3).
22 .SS "*BSD version"
23 4.4BSD and FreeBSD libm have a
24 .BR gamma ()
25 function that computes the Gamma function, as one would expect.
26 .SS "glibc version"
27 Glibc has a
28 .BR gamma ()
29 function that is equivalent to
30 .BR lgamma ()
31 and computes the natural logarithm of the Gamma function.
32 (This is for compatibility reasons only.
33 Don't use this function.)
34 .SH NOTES
35 .SS History
36 4.2BSD had a
37 .BR gamma ()
38 that computed
39 .RI ln(|Gamma(| x |)|),
40 leaving the sign of
41 .RI Gamma(| x |)
42 in the external integer
43 .IR signgam .
44 In 4.3BSD the name was changed to
45 .BR lgamma (),
46 and the man page promises
47 .sp
48 .in +3
49 "At some time in the future the name gamma will be rehabilitated
50 and used for the Gamma function"
51 .in
52 .sp
53 This did indeed happen in 4.4BSD, where
54 .BR gamma ()
55 computes the Gamma function (with no effect on
56 .IR signgam ).
57 However, this came too late, and we now have
58 .BR tgamma (),
59 the "true gamma" function.
60 .\" The FreeBSD man page says about gamma() that it is like lgamma()
61 .\" except that is does not set signgam.
62 .\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
63 .SH "CONFORMING TO"
64 4.2BSD.
65 Compatible with previous mistakes.
66 .SH "SEE ALSO"
67 .BR lgamma (3),
68 .BR signgam (3),
69 .BR tgamma (3)