GAMMA(3M) UNIX Programmer's Manual GAMMA(3M) NAME gamma, signgam - log gamma function SYNOPSIS #include extern int signgam; double gamma (x) double x; HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION _G_a_m_m_a returns _l_n|G(|_x|)|. The sign of G(|_x|) is returned in the external integer _s_i_g_n_g_a_m. The following C program frag- ment might be used to calculate G: y = gamma (x); if (y > _l_o_g_m_a_x) error (); y = exp (y) * signgam; /* _l_o_g_m_a_x is floor(ln(maxreal)) */ DIAGNOSTICS For negative integer arguments, a huge value is returned, and _e_r_r_n_o is set to EDOM.