sysdeps/arm/armv6t2/strlen.S: strlen implementation for armv6t2.
[glibc.git] / math / w_tgammal.c
blob72b247db2a4b0a985e85758ca437c113cffe6b5d
1 /* w_gammal.c -- long double version of w_gamma.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 gammal(double x)
18 * Return the Gamma function of x.
21 #include <math.h>
22 #include <math_private.h>
24 long double
25 __tgammal(long double x)
27 int local_signgam;
28 long double y = __ieee754_gammal_r(x,&local_signgam);
30 if(__builtin_expect(!__finitel(y), 0)
31 && (__finitel (x) || __isinfl (x) < 0)
32 && _LIB_VERSION != _IEEE_) {
33 if(x==0.0)
34 return __kernel_standard_l(x,x,250); /* tgamma pole */
35 else if(__floorl(x)==x&&x<0.0L)
36 return __kernel_standard_l(x,x,241); /* tgamma domain */
37 else
38 return __kernel_standard_l(x,x,240); /* tgamma overflow */
40 return local_signgam < 0 ? - y : y;
42 weak_alias (__tgammal, tgammal)