*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> gammaf (3)              
Title
Content
Arch
Section
 

LGAMMA(3)

Contents


NAME    [Toc]    [Back]

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

LIBRARY    [Toc]    [Back]

     Math Library (libm, -lm)

SYNOPSIS    [Toc]    [Back]

     #include <math.h>

     extern int signgam;

     double
     lgamma(double x);

     float
     lgammaf(float x);

     double
     lgamma_r(double x, int *sign);

     float
     lgammaf_r(float x, int *sign);

     double
     gamma(double x);

     float
     gammaf(float x);

     double
     gamma_r(double x, int *sign);

     float
     gammaf_r(float x, int *sign);

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

     lgamma_r() is a reentrant interface that _erforms identically to
     lgamma(), differing in that the sign of | (x) is stored in the location
     pointed to by the sign argument and signgam is not modified.

IDIOSYNCRASIES    [Toc]    [Back]

     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);

     Only after lgamma() has returned can signgam be correct.

RETURN VALUES    [Toc]    [Back]

     lgamma() returns appropriate values unless an argument is out of range.
     Overflow will occur for sufficiently large positive values, and non-positive
 integers.  On the VAX, the reserved operator is returned, and errno
     is set to ERANGE.

SEE ALSO    [Toc]    [Back]

      
      
     math(3)

HISTORY    [Toc]    [Back]

     The lgamma function appeared in 4.3BSD.

BSD                            December 3, 1992                            BSD
[ Back ]
 Similar pages
Name OS Title
lgammaf FreeBSD log gamma functions, gamma function
gamma FreeBSD log gamma functions, gamma function
tgamma FreeBSD log gamma functions, gamma function
gammaf FreeBSD log gamma functions, gamma function
lgamma FreeBSD log gamma functions, gamma function
gamma Tru64 Compute the logarithm of the gamma function
lgamma Tru64 Compute the logarithm of the gamma function
gamma OpenBSD log gamma functions
gammaf OpenBSD log gamma functions
lgamma OpenBSD log gamma functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service