tgamma - C math.h

C examples for math.h:tgamma

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Returns the gamma function of x.

Prototype

long double tgammal (long double x);
long double tgamma (long double x);
     double tgamma  (     double x);
      float tgammaf (      float x);
      float tgamma (      float x);
     double tgamma (T x);           

Parameters

Parameter Description
x Parameter for the gamma function.

Return Value

Gamma function of x.

Example

Demo Code


#include <stdio.h>
#include <math.h>

int main ()/* w w  w.  j a v  a2s.com*/
{
  double param = 0.5;
  double result = tgamma (param);
  
  printf ("tgamma(%f) = %f\n", param, result );
  return 0;
}

Related Tutorials