IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.
 


gammaf(3)

NAME

     lgamma, lgamma_r, lgammaf, lgammaf_r, gamma, gamma_r, gammaf, gammaf_r,
     tgamma -- log gamma functions, gamma function


LIBRARY

     Math Library (libm, -lm)


SYNOPSIS

     #include <math.h>

     extern int signgam;

     double
     lgamma(double x);

     double
     lgamma_r(double x, int *signgamp);

     float
     lgammaf(float x);

     float
     lgammaf_r(float x, int *signgamp);

     double
     gamma(double x);

     double
     gamma_r(double x, int *signgamp);

     float
     gammaf(float x);

     float
     gammaf_r(float x, int *signgamp);

     double
     tgamma(double x);


DESCRIPTION _

     lgamma(x) and lgammaf(x) return ln|| (x)|.
						       _
     The external integer signgam returns the sign of | (x).

     lgamma_r(x, signgamp) and lgammaf_r(x, signgamp) provide the same func-
     tionality as lgamma(x) and lga_maf(x) but the caller must provide an
     integer to store the sign of | (x).

     gamma(), gammaf(), gamma_r(), and gammaf_r() are deprecated aliases for
     lgamma(), lgammaf()_ lgamma_r(), and lgammaf_r(), respectively.
     tgamma(x) returns | (x), with no effect on signgam.


IDIOSYNCRASIES

     D_ not use the expression ``signgam*exp(lgamma(x))'' to compute g :=
     | (x).  Instead use a program like this (in C):

	   lg = lgamma(x); g = signgam*exp(lg);
     gamma(), gamma_r(), gammaf(), gammaf_r(), lgamma(), lgamma_r(),
     lgammaf(), and lgammaf_r() return appropriate values unless an argument
     is out of range.  Overflow will occur for sufficiently large positive
     values, and non-positive integers.  For large non-integer negative val-
     ues, tgamma() will underflow.


SEE ALSO

     math(3)


STANDARDS

     The lgamma() and tgamma() functions are expected to conform to ISO/IEC
     9899:1999 (``ISO C99'').


HISTORY

     The lgamma() function appeared in 4.3BSD_	The gamma() function appeared
     in 4.4BSD as a function which computed | (x).  This version was used in
     FreeBSD 1.1.  The name gamma() was originally dedicated to the lgamma()
     function, and that usage was restored by switching to Sun's fdlibm in
     FreeBSD 1.1.5.  The tgamma() function appeared in FreeBSD 5.0.

FreeBSD 5.4		       January 14, 2005 		   FreeBSD 5.4

SPONSORED LINKS




Man(1) output converted with man2html , sed , awk