LGAMMA(3) | Library Functions Manual | LGAMMA(3) |
extern int signgam;
float
lgammaf(float x);
double
lgamma_r(double x, int *sign);
float
lgammaf_r(float x, int *sign);
double
gamma(double x);
float
gammaf(float x);
double
gamma_r(double x, int *sign);
float
gammaf_r(float x, int *sign);
double
tgamma(double x);
float
tgammaf(float x);
The external integer signgam returns the sign of Γ(x).
lgamma_r() is a reentrant interface that performs identically to lgamma(), differing in that the sign of Γ(x) is stored in the location pointed to by the sign argument and signgam is not modified.
The tgamma(x) and tgammaf(x) functions return Γ(x), with no effect on signgam.
gamma(), gammaf(), gamma_r(), and gammaf_r() are deprecated aliases for lgamma(), lgammaf(), lgamma_r(), and lgammaf_r(), respectively.
signgam∗exp(lgamma(x))
” to compute g := Γ(x). Instead use a program like this (in C):
lg = lgamma(x); g = signgam∗exp(lg);
Only after lgamma() has returned can signgam be correct.
May 4, 2012 | NetBSD 6.1 |