man(1) Manual page archive


NAME
     gamma - log gamma function

SYNOPSIS
     jsr     pc,gamma

     double gamma(x)
     double x;

DESCRIPTION
     If x is passed (in fr0) gamma returns ln |Γ(x)| (in fr0).
     The sign of Γ(x) is returned in the external integer
     signgam.  The following C program might be used to calculate
     Γ:

             y = gamma(x);
             if (y > 88.)
                     error( );
             y = exp(y);
             if(signgam)
                     y = -y;

DIAGNOSTICS
     The c-bit is set on negative integral arguments and the max-
     imum value is returned.  There is no error return for C pro-
     grams.

BUGS
     No error return from C.

 1