SYNOPSIS
#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)
long double fgamma(double x)
float tgammaf(float x)
DESCRIPTION
The
where
is defined as:
The sign of
is returned in the external integer signgam.
This function is identical to
Do not use the expression "signgam*exp(lgamma(x))" to compute g := GAMMA(x). Instead use a program like this (in C):
lg = lgamma(x); g = signgam*exp(lg);
Only after
PARAMETERS
 sign

Is the location where the resulting sign is stored.
 x

Is the value whose logarithmic gamma is computed.
RETURN VALUES
On success the
If x is NaN, NaN is returned.
If x is a nonpositive integer, then:

In IEEE mode, HUGE_VAL is returned.

In POSIX mode, HUGE_VAL is returned and errno is set to EDOM.

In SVID mode, HUGE is returned and
matherr() is called. 
In XOPEN mode, HUGE_VAL is returned and
matherr() is called.
If the correct value would cause underflow, 0 is returned.
CONFORMANCE
UNIX 98.
MULTITHREAD SAFETY LEVEL
Unsafe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64Bit Edition
SEE ALSO
 Functions:
math()
PTC MKS Toolkit 10.3 Documentation Build 39.