function
<cmath> <ctgmath>
lgammadouble lgamma (double x); float lgammaf (float x);long double lgammal (long double x);
double lgamma (double x); float lgamma (float x);long double lgamma (long double x); double lgamma (T x); // additional overloads for integral types
Compute log-gamma function
Returns the natural logarithm of the absolute value of the gamma function of x.Header
<tgmath.h>provides a type-generic macro version of this function.
are provided in this header (
<cmath>
) for the
integral types: These overloads effectively cast
xto a
double
before calculations (defined for
Tbeing any
integral type).
If an overflow range error occurs:
If a pole error occurs:
1
2
3
4
5
6
7
8
9
10
11
12
/* lgamma example */
#include <stdio.h> /* printf */
#include <math.h> /* lgamma */
int main ()
{
double param, result;
param = 0.5;
result = lgamma (param);
printf ("lgamma(%f) = %f\n", param, result );
return 0;
}
lgamma (0.500000) = 0.572365
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4