C examples for math.h:lgamma
function
<cmath> <ctgmath> <math.h>
Returns the natural logarithm of the absolute value of the gamma function of x.
long double lgammal (long double x); long double lgamma (long double x); double lgamma (double x); float lgammaf (float x); double lgamma (double x); float lgamma (float x); double lgamma (T x);
Parameter | Description |
---|---|
x | Parameter for the log-gamma function. |
Log-gamma function of x.
#include <stdio.h> #include <math.h> /* lgamma */ int main ()//from w ww. ja v a2 s.co m { double param = 1.5; double result = lgamma (param); printf ("lgamma(%f) = %f\n", param, result ); return 0; }