OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / 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 2008-08-05 "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 \fI\-lm\fP.
19 .sp
20 .in -4n
21 Feature Test Macro Requirements for glibc (see
22 .BR feature_test_macros (7)):
23 .in
24 .sp
25 .ad l
26 .BR gamma ():
27 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
28 .br
29 .BR gammaf (),
30 .BR gammal ():
31 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600
32 .\" Also seems to work: -std=c99 -D_XOPEN_SOURCE
33 .ad b
34 .SH DESCRIPTION
35 These functions are deprecated: instead, use either the
36 .BR tgamma (3)
37 or the
38 .BR lgamma (3)
39 functions, as appropriate.
40
41 For the definition of the Gamma function, see
42 .BR tgamma (3).
43 .SS "*BSD version"
44 The libm in 4.4BSD and some versions of FreeBSD had a
45 .BR gamma ()
46 function that computes the Gamma function, as one would expect.
47 .SS "glibc version"
48 Glibc has a
49 .BR gamma ()
50 function that is equivalent to
51 .BR lgamma (3)
52 and computes the natural logarithm of the Gamma function.
53 .SH RETURN VALUE
54 See
55 .BR lgamma (3).
56 .SH ERRORS
57 See
58 .BR lgamma (3).
59 .SH "CONFORMING TO"
60 Because of historical variations in behavior across systems,
61 this function is not specified in any standard.
62 .SH NOTES
63 .SS History
64 4.2BSD had a
65 .BR gamma ()
66 that computed
67 .RI ln(|Gamma(| x |)|),
68 leaving the sign of
69 .RI Gamma(| x |)
70 in the external integer
71 .IR signgam .
72 In 4.3BSD the name was changed to
73 .BR lgamma (3),
74 and the man page promises
75 .sp
76 .in +4n
77 "At some time in the future the name gamma will be rehabilitated
78 and used for the Gamma function"
79 .in
80 .sp
81 This did indeed happen in 4.4BSD, where
82 .BR gamma ()
83 computes the Gamma function (with no effect on
84 .IR signgam ).
85 However, this came too late, and we now have
86 .BR tgamma (3),
87 the "true gamma" function.
88 .\" The FreeBSD man page says about gamma() that it is like lgamma()
89 .\" except that is does not set signgam.
90 .\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
91 .SH "SEE ALSO"
92 .BR lgamma (3),
93 .BR signgam (3),
94 .BR tgamma (3)