about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64')
-rw-r--r--sysdeps/ieee754/dbl-64/e_hypot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_hypot.c b/sysdeps/ieee754/dbl-64/e_hypot.c
index 9f4321efe1..500658d076 100644
--- a/sysdeps/ieee754/dbl-64/e_hypot.c
+++ b/sysdeps/ieee754/dbl-64/e_hypot.c
@@ -102,6 +102,17 @@ __ieee754_hypot (double x, double y)
 	  b *= t1;
 	  a *= t1;
 	  k -= 1022;
+	  GET_HIGH_WORD (ha, a);
+	  GET_HIGH_WORD (hb, b);
+	  if (hb > ha)
+	    {
+	      t1 = a;
+	      a = b;
+	      b = t1;
+	      j = ha;
+	      ha = hb;
+	      hb = j;
+	    }
 	}
       else                      /* scale a and b by 2^600 */
 	{