diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_gamma_r.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_gamma_r.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c index 2d156850d5..2744549cbd 100644 --- a/sysdeps/ieee754/dbl-64/e_gamma_r.c +++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c @@ -1,5 +1,5 @@ /* Implementation of gamma function according to ISO C. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -18,7 +18,9 @@ <http://www.gnu.org/licenses/>. */ #include <math.h> +#include <math-narrow-eval.h> #include <math_private.h> +#include <math-underflow.h> #include <float.h> /* Coefficients B_2k / 2k(2k-1) of x^-(2k-1) inside exp in Stirling's @@ -98,7 +100,7 @@ gamma_positive (double x, int *exp2_adj) double ret = (__ieee754_pow (x_adj_mant, x_adj) * __ieee754_exp2 (x_adj_log2 * x_adj_frac) * __ieee754_exp (-x_adj) - * __ieee754_sqrt (2 * M_PI / x_adj) + * sqrt (2 * M_PI / x_adj) / prod); exp_adj += x_eps * __ieee754_log (x_adj); double bsum = gamma_coeff[NCOEFF - 1]; @@ -114,7 +116,7 @@ double __ieee754_gamma_r (double x, int *signgamp) { int32_t hx; - u_int32_t lx; + uint32_t lx; double ret; EXTRACT_WORDS (hx, lx, x); @@ -126,7 +128,7 @@ __ieee754_gamma_r (double x, int *signgamp) return 1.0 / x; } if (__builtin_expect (hx < 0, 0) - && (u_int32_t) hx < 0xfff00000 && __rint (x) == x) + && (uint32_t) hx < 0xfff00000 && __rint (x) == x) { /* Return value for integer x < 0 is NaN with invalid exception. */ *signgamp = 0; |