gamma Subroutine
Purpose
Computes the natural logarithm of the gamma function.
Libraries
The gamma: IEEE Math Library (libm.a) or System V Math Library (libmsaa.a)
Syntax
#include <math.h>
extern int signgam;
double gamma (x)
double x;
Description
The gamma subroutine computes the logarithm of the gamma function.
The sign of gamma( x) is returned in the external integer signgam.
Note: Compile
any routine that uses subroutines from the libm.a with the -lm flag.
To compile the lgamma.c file, enter:
cc lgamma.c -lm
Parameters
Item | Description |
---|---|
x | Specifies the value to be computed. |