summaryrefslogtreecommitdiff
path: root/man3/gamma.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2004-11-03 13:51:07 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2004-11-03 13:51:07 +0000
commitfea681dafb1363a154b7fc6d59baa83d2a9ebc5c (patch)
tree8ea275c0f242af739617d0afc3e1b16c4eff3dc2 /man3/gamma.3
Import of man-pages 1.70
Diffstat (limited to 'man3/gamma.3')
-rw-r--r--man3/gamma.367
1 files changed, 67 insertions, 0 deletions
diff --git a/man3/gamma.3 b/man3/gamma.3
new file mode 100644
index 00000000..65346fe7
--- /dev/null
+++ b/man3/gamma.3
@@ -0,0 +1,67 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" Distributed under GPL
+.\"
+.\" Modified 2003-11-18, aeb: historical remarks
+.\"
+.TH GAMMA 3 2002-08-10 "GNU" "libc math functions"
+.SH NAME
+gamma, gammaf, gammal \- (logarithm of the) gamma function
+.SH SYNOPSIS
+.B #include <math.h>
+.sp
+.BI "double gamma(double " x ");"
+.sp
+.BI "float gammaf(float " x ");"
+.sp
+.BI "long double gammal(long double " x ");"
+.sp
+Link with \-lm.
+.SH DESCRIPTION
+For the definition of the Gamma function, see
+.BR tgamma (3).
+.PP
+.SS "*BSD version"
+4.4BSD and FreeBSD libm have a
+.B gamma()
+function that computes the Gamma function, as one would expect.
+.SS "glibc version"
+Glibc has a
+.B gamma()
+function that is equivalent to
+.B lgamma()
+and computes the natural logarithm of the Gamma function.
+(This is for compatibility reasons only. Don't use this function.)
+.SH HISTORY
+4.2BSD had a
+.B gamma()
+that computed
+.RI ln(|Gamma(| x |)|),
+leaving the sign of
+.RI Gamma(| x |)
+in the external integer
+.IR signgam .
+In 4.3BSD the name was changed to
+.BR lgamma() ,
+and the man page promises
+.sp
+.in +3
+"At some time in the future the name gamma will be rehabilitated
+and used for the Gamma function"
+.in
+.sp
+This did indeed happen in 4.4BSD, where
+.B gamma()
+computes the Gamma function (with no effect on
+.IR signgam ).
+However, this came too late, and we now have
+.BR tgamma() ,
+the "true gamma" function.
+.\" The FreeBSD man page says about gamma() that it is like lgamma()
+.\" except that is does not set signgam.
+.\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
+.SH "CONFORMING TO"
+4.2BSD. Compatible with previous mistakes.
+.SH "SEE ALSO"
+.BR lgamma (3),
+.BR signgam (3),
+.BR tgamma (3)