/* 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>
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;