English pages are provided only to compare translations to original pages,
better looking pages can be browsed
at the Linux man-pages official site.
Linux Programmer's Manual (3)
gamma, gammaf, gammal - (logarithm of the) gamma function
double gamma(double x);
float gammaf(float x);
long double gammal(long double x);
Link with -lm.
Feature Test Macro Requirements for glibc (see
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
These functions are deprecated: instead, use either the
functions, as appropriate.
For the definition of the Gamma function, see
The libm in 4.4BSD and some versions of FreeBSD had a
function that computes the Gamma function, as one would expect.
Glibc has a
function that is equivalent to
and computes the natural logarithm of the Gamma function.
Because of historical variations in behavior across systems,
this function is not specified in any standard.
4.2BSD had a
leaving the sign of
in the external integer
In 4.3BSD the name was changed to
and the man page promises
"At some time in the future the name gamma will be rehabilitated
and used for the Gamma function"
This did indeed happen in 4.4BSD, where
computes the Gamma function (with no effect on
However, this came too late, and we now have
the "true gamma" function.
This page is part of release 3.66 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- *BSD version
- glibc version
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 21:43:00 GMT, July 12, 2014