lgamma()

Computes loge| G(x) |.

  #include <math.h>
  
  double lgamma(double x);
  
  float lgammaf(float x);
  
  long double lgammal(long double x);
  
  extern int signgam;    
Parameter

x

The value from which to compute.

Remarks

This function computes loge of the absolute value of G(x), where G(x) is defined as the integral of e-t * t x-1 dt from 0 to infinity. The function returns the sign of G(x) the external variable signgam. The argument x need not be a non-positive integer, (G(x) is defined over the real numbers, except the non-positive integers).

If this function cannot compute a value it sets errno to a non-zero value, either EDOM or ERANGE, and returns either HUGE_VAL or NAN. Use fpclassify() to check the validity of the result returned by gamma().

This facility may not be available on configurations of the EWL that run on platforms that do not have floating-point math capabilities.

This facility is not specified in the ISO/IEC standards. It is an EWL extension of the standard libraries.