summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-96/e_hypotl.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-12-20 09:29:29 +0100
committerThomas Schwinge <thomas@codesourcery.com>2013-12-20 09:29:29 +0100
commita65dd355fb80a05215e15ae97649de52aec885e3 (patch)
tree81701bb0c6b648630f2bf1729a85d7f5eb49e67b /sysdeps/ieee754/ldbl-96/e_hypotl.c
parent296a5732f94abe4d5699dc981e4ccfb950b48cee (diff)
parentb4578bab30f72cddd2cf38abfb39f9c8dc892249 (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/e_hypotl.c')
-rw-r--r--sysdeps/ieee754/ldbl-96/e_hypotl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-96/e_hypotl.c b/sysdeps/ieee754/ldbl-96/e_hypotl.c
index 7895488848..d3152f91e5 100644
--- a/sysdeps/ieee754/ldbl-96/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-96/e_hypotl.c
@@ -89,6 +89,17 @@ long double __ieee754_hypotl(long double x, long double y)
b *= t1;
a *= t1;
k -= 16382;
+ GET_LDOUBLE_EXP (ea, a);
+ GET_LDOUBLE_EXP (eb, b);
+ if (eb > ea)
+ {
+ t1 = a;
+ a = b;
+ b = t1;
+ j = ea;
+ ea = eb;
+ eb = j;
+ }
} else { /* scale a and b by 2^9600 */
ea += 0x2580; /* a *= 2^9600 */
eb += 0x2580; /* b *= 2^9600 */