]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man/man3/gamma.3
man/, share/mk/: Move man*/ to man/
[thirdparty/man-pages.git] / man / man3 / gamma.3
CommitLineData
a1eaacb1 1'\" t
fea681da 2.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2297bf0e 3.\"
95fb8859 4.\" SPDX-License-Identifier: GPL-1.0-or-later
fea681da
MK
5.\"
6.\" Modified 2003-11-18, aeb: historical remarks
7.\"
4c1c5274 8.TH gamma 3 (date) "Linux man-pages (unreleased)"
fea681da
MK
9.SH NAME
10gamma, gammaf, gammal \- (logarithm of the) gamma function
20e9513d
AC
11.SH LIBRARY
12Math library
8fc3b2cf 13.RI ( libm ", " \-lm )
fea681da 14.SH SYNOPSIS
c7db92b9 15.nf
fea681da 16.B #include <math.h>
c6d039a3 17.P
6b7d08b2
AC
18.BI "[[deprecated]] double gamma(double " x ");"
19.BI "[[deprecated]] float gammaf(float " x ");"
20.BI "[[deprecated]] long double gammal(long double " x ");"
c7db92b9 21.fi
c6d039a3 22.P
d39ad78f 23.RS -4
cc4615cc
MK
24Feature Test Macro Requirements for glibc (see
25.BR feature_test_macros (7)):
d39ad78f 26.RE
c6d039a3 27.P
ccf04431 28.BR gamma ():
9d2adbae
MK
29.nf
30 _XOPEN_SOURCE
31 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
75c018a1 32 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
9d2adbae 33.fi
c6d039a3 34.P
cc4615cc
MK
35.BR gammaf (),
36.BR gammal ():
9d2adbae
MK
37.nf
38 _XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
39 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
75c018a1 40 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
9d2adbae 41.fi
fea681da 42.SH DESCRIPTION
ccf04431
MK
43These functions are deprecated: instead, use either the
44.BR tgamma (3)
45or the
46.BR lgamma (3)
47functions, as appropriate.
c6d039a3 48.P
fea681da
MK
49For the definition of the Gamma function, see
50.BR tgamma (3).
73d8cece 51.SS *BSD version
ccf04431 52The libm in 4.4BSD and some versions of FreeBSD had a
63aa9df0 53.BR gamma ()
fea681da 54function that computes the Gamma function, as one would expect.
73d8cece 55.SS glibc version
75c018a1 56glibc has a
63aa9df0 57.BR gamma ()
fea681da 58function that is equivalent to
109b6459 59.BR lgamma (3)
fea681da 60and computes the natural logarithm of the Gamma function.
ccf04431
MK
61.SH RETURN VALUE
62See
63.BR lgamma (3).
64.SH ERRORS
65See
66.BR lgamma (3).
c53ce9cc
PH
67.SH ATTRIBUTES
68For an explanation of the terms used in this section, see
69.BR attributes (7).
70.TS
71allbox;
c466875e 72lbx lb lb
c53ce9cc
PH
73l l l.
74Interface Attribute Value
75T{
9e54434e
BR
76.na
77.nh
c53ce9cc
PH
78.BR gamma (),
79.BR gammaf (),
80.BR gammal ()
0bd42ffb 81T} Thread safety MT-Unsafe race:signgam
c53ce9cc 82.TE
3113c7f3 83.SH STANDARDS
4131356c
AC
84None.
85.SH HISTORY
86SVID 2.
c6d039a3 87.P
ccf04431 88Because of historical variations in behavior across systems,
c50730b6 89this function is not specified in any recent standard.
c6d039a3 90.P
fea681da 914.2BSD had a
63aa9df0 92.BR gamma ()
fea681da
MK
93that computed
94.RI ln(|Gamma(| x |)|),
95leaving the sign of
96.RI Gamma(| x |)
97in the external integer
98.IR signgam .
99In 4.3BSD the name was changed to
109b6459 100.BR lgamma (3),
fea681da 101and the man page promises
c6d039a3 102.P
088a639b 103.in +4n
fea681da
MK
104"At some time in the future the name gamma will be rehabilitated
105and used for the Gamma function"
106.in
c6d039a3 107.P
fea681da 108This did indeed happen in 4.4BSD, where
63aa9df0 109.BR gamma ()
fea681da
MK
110computes the Gamma function (with no effect on
111.IR signgam ).
112However, this came too late, and we now have
109b6459 113.BR tgamma (3),
fea681da
MK
114the "true gamma" function.
115.\" The FreeBSD man page says about gamma() that it is like lgamma()
116.\" except that is does not set signgam.
117.\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
47297adb 118.SH SEE ALSO
fea681da
MK
119.BR lgamma (3),
120.BR signgam (3),
121.BR tgamma (3)