1 /* @(#)w_lgamma.c 5.1 93/09/24 */
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
10 * ====================================================
13 /* double lgamma(double x)
14 * Return the logarithm of the Gamma function of x.
16 * Method: call __ieee754_lgamma_r
20 #include <math_private.h>
25 int local_signgam
= 0;
26 double y
= __ieee754_lgamma_r(x
,
27 _LIB_VERSION
!= _ISOC_
28 /* ISO C99 does not define the
32 if(__builtin_expect(!__finite(y
), 0)
33 && __finite(x
) && _LIB_VERSION
!= _IEEE_
)
34 return __kernel_standard(x
, x
,
36 ? 15 /* lgamma pole */
37 : 14); /* lgamma overflow */
41 weak_alias (__lgamma
, lgamma
)
42 strong_alias (__lgamma
, __gamma
)
43 weak_alias (__gamma
, gamma
)
45 strong_alias (__lgamma
, __lgammal
)
46 weak_alias (__lgamma
, lgammal
)
47 strong_alias (__gamma
, __gammal
)
48 weak_alias (__gamma
, gammal
)