14
14
* ====================================================
17
#if defined(LIBM_SCCS) && !defined(lint)
18
static char rcsid[] = "$NetBSD: $";
21
17
/* long double gammal(double x)
22
18
* Return the Gamma function of x.
26
#include "math_private.h"
22
#include <math_private.h>
29
long double __tgammal(long double x)
31
long double __tgammal(x)
25
__tgammal(long double x)
37
y = __ieee754_gammal_r(x,&local_signgam);
38
if (local_signgam < 0) y = -y;
42
if(_LIB_VERSION == _IEEE_) return y;
28
long double y = __ieee754_gammal_r(x,&local_signgam);
44
if(!__finitel(y)&&__finitel(x)) {
30
if(__builtin_expect(!__finitel(y), 0) && __finitel(x)
31
&& _LIB_VERSION != _IEEE_) {
46
33
return __kernel_standard(x,x,250); /* tgamma pole */
47
else if(__floorl(x)==x&&x<0.0)
34
else if(__floorl(x)==x&&x<0.0L)
48
35
return __kernel_standard(x,x,241); /* tgamma domain */
50
37
return __kernel_standard(x,x,240); /* tgamma overflow */
39
return local_signgam < 0 ? - y : y;
55
41
weak_alias (__tgammal, tgammal)