Everything

lgamma / lgammaf / lgammal


Calculates the logarithm of the gamma function of a floating-point number.

[Format]

#include <math.h>

double lgamma(double d);

float lgammaf(float d);

long double lgammal(long double d);

[Parameters]

d Value for which the logarithm of the gamma function is to be computed

[Return values]

Normal: Logarithm of gamma function of d

Abnormal: Domain error: Returns HUGE_VAL, HUGE_VALF, or HUGE_VALL with the mathematically correct sign.

Range error: Returns +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL.

[Remarks]

A range error is set if the absolute value of d is too large or small.

A domain error occurs if d is a negative integer or 0 and the calculation result is not representable.