]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/gamma.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / gamma.3
index 6bcca3bbc672d0ce090163d453f37becf94287ab..d916e79294a295656098d78abf576964a5cda35a 100644 (file)
@@ -1,39 +1,88 @@
 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
 .\" Distributed under GPL
+.\" %%%LICENSE_END
 .\"
 .\" Modified 2003-11-18, aeb: historical remarks
 .\"
-.TH GAMMA 3 2002-08-10 "GNU" "Linux Programmer's Manual"
+.TH GAMMA 3 2017-09-15 "GNU" "Linux Programmer's Manual"
 .SH NAME
 gamma, gammaf, gammal \- (logarithm of the) gamma function
 .SH SYNOPSIS
 .B #include <math.h>
-.sp
+.PP
 .BI "double gamma(double " x ");"
 .br
 .BI "float gammaf(float " x ");"
 .br
 .BI "long double gammal(long double " x ");"
-.sp
-Link with \-lm.
+.PP
+Link with \fI\-lm\fP.
+.PP
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.PP
+.ad l
+.BR gamma ():
+.RS 4
+_XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.BR gammaf (),
+.BR gammal ():
+.RS 4
+_XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
 .SH DESCRIPTION
+These functions are deprecated: instead, use either the
+.BR tgamma (3)
+or the
+.BR lgamma (3)
+functions, as appropriate.
+.PP
 For the definition of the Gamma function, see
 .BR tgamma (3).
-.SS "*BSD version"
-4.4BSD and FreeBSD libm have a
+.SS *BSD version
+The libm in 4.4BSD and some versions of FreeBSD had a
 .BR gamma ()
 function that computes the Gamma function, as one would expect.
-.SS "glibc version"
+.SS glibc version
 Glibc has a
 .BR gamma ()
 function that is equivalent to
-.BR lgamma ()
+.BR lgamma (3)
 and computes the natural logarithm of the Gamma function.
-(This is for compatibility reasons only.
-Don't use this function.)
-.SH "CONFORMING TO"
-4.2BSD.
-Compatible with previous mistakes.
+.SH RETURN VALUE
+See
+.BR lgamma (3).
+.SH ERRORS
+See
+.BR lgamma (3).
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR gamma (),
+.BR gammaf (),
+.BR gammal ()
+T}     Thread safety   MT-Unsafe race:signgam
+.TE
+.SH CONFORMING TO
+Because of historical variations in behavior across systems,
+this function is not specified in any recent standard.
+It was documented in SVID 2.
 .SH NOTES
 .SS History
 4.2BSD had a
@@ -45,25 +94,25 @@ leaving the sign of
 in the external integer
 .IR signgam .
 In 4.3BSD the name was changed to
-.BR lgamma (),
+.BR lgamma (3),
 and the man page promises
-.sp
-.in +3
+.PP
+.in +4n
 "At some time in the future the name gamma will be rehabilitated
 and used for the Gamma function"
 .in
-.sp
+.PP
 This did indeed happen in 4.4BSD, where
 .BR gamma ()
 computes the Gamma function (with no effect on
 .IR signgam ).
 However, this came too late, and we now have
-.BR tgamma (),
+.BR tgamma (3),
 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 "SEE ALSO"
+.SH SEE ALSO
 .BR lgamma (3),
 .BR signgam (3),
 .BR tgamma (3)