about summary refs log tree commit diff
path: root/math/s_fdimf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_fdimf.c')
-rw-r--r--math/s_fdimf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/math/s_fdimf.c b/math/s_fdimf.c
index 2e8eccfc4f..8aed61d9e7 100644
--- a/math/s_fdimf.c
+++ b/math/s_fdimf.c
@@ -19,6 +19,7 @@
 
 #include <errno.h>
 #include <math.h>
+#include <math_private.h>
 
 float
 __fdimf (float x, float y)
@@ -26,7 +27,7 @@ __fdimf (float x, float y)
   if (islessequal (x, y))
     return 0.0f;
 
-  float r = x - y;
+  float r = math_narrow_eval (x - y);
   if (isinf (r) && !isinf (x) && !isinf (y))
     __set_errno (ERANGE);