]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/gamma.3
Import of man-pages 1.70
[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" "libc math functions"
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 .sp
14 .BI "float gammaf(float " x ");"
15 .sp
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 .PP
23 .SS "*BSD version"
24 4.4BSD and FreeBSD libm have a
25 .B gamma()
26 function that computes the Gamma function, as one would expect.
27 .SS "glibc version"
28 Glibc has a
29 .B gamma()
30 function that is equivalent to
31 .B lgamma()
32 and computes the natural logarithm of the Gamma function.
33 (This is for compatibility reasons only. Don't use this function.)
34 .SH HISTORY
35 4.2BSD had a
36 .B gamma()
37 that computed
38 .RI ln(|Gamma(| x |)|),
39 leaving the sign of
40 .RI Gamma(| x |)
41 in the external integer
42 .IR signgam .
43 In 4.3BSD the name was changed to
44 .BR lgamma() ,
45 and the man page promises
46 .sp
47 .in +3
48 "At some time in the future the name gamma will be rehabilitated
49 and used for the Gamma function"
50 .in
51 .sp
52 This did indeed happen in 4.4BSD, where
53 .B gamma()
54 computes the Gamma function (with no effect on
55 .IR signgam ).
56 However, this came too late, and we now have
57 .BR tgamma() ,
58 the "true gamma" function.
59 .\" The FreeBSD man page says about gamma() that it is like lgamma()
60 .\" except that is does not set signgam.
61 .\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
62 .SH "CONFORMING TO"
63 4.2BSD. Compatible with previous mistakes.
64 .SH "SEE ALSO"
65 .BR lgamma (3),
66 .BR signgam (3),
67 .BR tgamma (3)