about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/e_hypotl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_hypotl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
index 3b07a47b40..c68dac03b0 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
@@ -125,7 +125,11 @@ __ieee754_hypotl(long double x, long double y)
 	    w  = __ieee754_sqrtl(a1*b1-(w*(-w)-(a1*b2+a2*b)));
 	}
 	if(k!=0)
-	    return w*kld;
+	    {
+		w *= kld;
+		math_check_force_underflow_nonneg (w);
+		return w;
+	    }
 	else
 	    return w;
 }