]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/ieee754/dbl-64/gamma_productf.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / ieee754 / dbl-64 / gamma_productf.c
index df59e1beeccd55f254c9c9653a58c8583e625654..6bceda04f86ae22e227775e034c47bd00e0d23aa 100644 (file)
@@ -1,5 +1,5 @@
 /* Compute a product of X, X+1, ..., with an error estimate.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math-narrow-eval.h>
 #include <math_private.h>
 #include <float.h>
 
@@ -36,10 +37,7 @@ __gamma_productf (float x, float x_eps, int n, float *eps)
   for (int i = 1; i < n; i++)
     ret *= x_full + i;
 
-#if FLT_EVAL_METHOD != 0
-  volatile
-#endif
-  float fret = ret;
+  float fret = math_narrow_eval ((float) ret);
   *eps = (ret - fret) / fret;
 
   return fret;