#include <math.h>
extern int signgam;
double lgamma(x) double x;
lgamma() returns
ln|\(*G(x)| where \(*G(x) = \(is0\(iftx-1e-tdt for x > 0 and \(*G(x) = \(*p/(\(*G(1-x)sin(\(*px)) for x < 1.
The external integer signgam returns the sign of \(*G(x).
Do not use the expression signgam*exp(lgamma(x)) to compute `g := \(*G(x)'. Instead compute lgamma() first:
only after lgamma() has returned can signgam be correct. Note: \(*G(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
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97