about summary refs log tree commit diff
path: root/src/math/fmaf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/fmaf.c')
-rw-r--r--src/math/fmaf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/fmaf.c b/src/math/fmaf.c
index aa57feb6..80f5cd8a 100644
--- a/src/math/fmaf.c
+++ b/src/math/fmaf.c
@@ -50,7 +50,7 @@ float fmaf(float x, float y, float z)
 	/* Common case: The double precision result is fine. */
 	if ((u.i & 0x1fffffff) != 0x10000000 || /* not a halfway case */
 		e == 0x7ff ||                   /* NaN */
-		result - xy == z ||                 /* exact */
+		(result - xy == z && result - z == xy) || /* exact */
 		fegetround() != FE_TONEAREST)       /* not round-to-nearest */
 	{
 		/*