1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" based on glibc infopages
5 .TH LGAMMA 3 2007-07-26 "" "Linux Programmer's Manual"
7 lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \-
13 .BI "double lgamma(double " x );
15 .BI "float lgammaf(float " x );
17 .BI "long double lgammal(long double " x );
19 .BI "double lgamma_r(double " x ", int *" signp );
21 .BI "float lgammaf_r(float " x ", int *" signp );
23 .BI "long double lgammal_r(long double " x ", int *" signp );
25 .BI "extern int " signgam ;
31 Feature Test Macro Requirements for glibc (see
32 .BR feature_test_macros (7)):
39 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or
45 _BSD_SOURCE || _SVID_SOURCE
48 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
51 For the definition of the Gamma function, see
56 function returns the natural logarithm of
57 the absolute value of the Gamma function.
58 The sign of the Gamma function is returned in the
59 external integer \fIsigngam\fP declared in
61 It is 1 when the Gamma function is positive or zero, \-1
64 Since using a constant location
66 is not thread-safe, the functions
69 been introduced; they return this sign via the parameter
72 For non-positive integer values of \fIx\fP,
78 and raises the zero divide exception.
88 In order to check for errors, set
91 .I feclearexcept(FE_ALL_EXCEPT)
92 before calling these functions.
96 .I fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
97 is non-zero, an error has occurred.
99 A range error occurs if x is too large.
100 A pole error occurs if x is a negative integer or zero.