Format
#include <math.h> double gamma(double x);
Language Level: Extension
gamma computes ln( |G(x)| ), where

Return Value
gamma returns the value of ln(|G(x)|). If x
is a negative value, errno is set to EDOM. If the result causes
an overflow, gamma returns HUGE_VAL and sets errno to ERANGE.
Example
This example uses gamma to calculate ln(|G(x)|), where x
= 42.
#include <math.h> #include <stdio.h>
int main(void)
{
double x=42, g_at_x;
g_at_x = exp(gamma(x)); /* g_at_x = 3.345253e+49 */
printf ("The value of G(%4.2lf) is %7.2e\n", x, g_at_x);
/********************************************************
The output should be:
The value of G(42.00) is 3.35e+49 ********************************************************/ }
![]()
Bessel Functions -- Solve Differential
Equations
erf - erfc -- Calculate Error Functions
<math.h>