unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

LGAMMA(3M)                                                          LGAMMA(3M)



NAME
       lgamma - log gamma function

SYNOPSIS
       #include <&lt;math.h>&gt;

       extern int signgam;

       double lgamma(x)
       double x;

DESCRIPTION
       lgamma() returns
       lgamma returns ln|(x)|.

       The external integer signgam returns the sign of (x).

IDIOSYNCRASIES
       Do not use the expression signgam*exp(lgamma(x)) to compute `g := (x)'.
       Instead compute lgamma() first:
              lg = lgamma(x); g = signgam*exp(lg);

       only after lgamma() has returned can signgam  be  correct.   Note:  (x)
       must  overflow  when  x  is  large  enough,  underflow when -x is large
       enough, and generate a division by zero exception at the  singularities
       x  a nonpositive integer.  In addition, lgamma() may also set errno and
       call matherr(3M).

SEE ALSO
       matherr(3M)



                               22 November 1987                     LGAMMA(3M)