Don't macro-expand failed assertion expression [BZ #18604]
[glibc.git] / math / w_lgammal.c
blob8abe6a018fe2a7c8f7ac585ca34b6428c54380c2
1 /* w_lgammal.c -- long double version of w_lgamma.c.
2 * Conversion to long double by Ulrich Drepper,
3 * Cygnus Support, drepper@cygnus.com.
4 */
6 /*
7 * ====================================================
8 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
10 * Developed at SunPro, a Sun Microsystems, Inc. business.
11 * Permission to use, copy, modify, and distribute this
12 * software is freely granted, provided that this notice
13 * is preserved.
14 * ====================================================
17 /* long double lgammal(long double x)
18 * Return the logarithm of the Gamma function of x.
20 * Method: call __ieee754_lgammal_r
23 #include <math.h>
24 #include <math_private.h>
26 long double
27 __lgammal(long double x)
29 int local_signgam = 0;
30 long double y = __ieee754_lgammal_r(x,
31 _LIB_VERSION != _ISOC_
32 /* ISO C99 does not define the
33 global variable. */
34 ? &signgam
35 : &local_signgam);
36 if(__builtin_expect(!isfinite(y), 0)
37 && isfinite(x) && _LIB_VERSION != _IEEE_)
38 return __kernel_standard_l(x, x,
39 __floorl(x)==x&&x<=0.0L
40 ? 215 /* lgamma pole */
41 : 214); /* lgamma overflow */
43 return y;
45 weak_alias (__lgammal, lgammal)
46 strong_alias (__lgammal, __gammal)
47 weak_alias (__gammal, gammal)