about summary refs log tree commit diff
path: root/sysdeps/powerpc/fpu/e_hypotf.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-05-06 14:40:17 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-05-06 14:40:17 -0500
commit16e616a72f9ac247520c0c7da99b99e229facdf9 (patch)
treeebecfcd57f8fec0766600b1bcc1d037fdd83ed8a /sysdeps/powerpc/fpu/e_hypotf.c
parentd5e8275481e57cc7f3bd6ba435a7bbced9b97202 (diff)
downloadglibc-16e616a72f9ac247520c0c7da99b99e229facdf9.tar.gz
glibc-16e616a72f9ac247520c0c7da99b99e229facdf9.tar.xz
glibc-16e616a72f9ac247520c0c7da99b99e229facdf9.zip
PowerPC: fix hypot/hypof FP exceptions
This patch fixes hypot/hypotf spurious floating-point exceptions
generate by internal operations.
Diffstat (limited to 'sysdeps/powerpc/fpu/e_hypotf.c')
-rw-r--r--sysdeps/powerpc/fpu/e_hypotf.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sysdeps/powerpc/fpu/e_hypotf.c b/sysdeps/powerpc/fpu/e_hypotf.c
index e97f0c35e3..93055afce5 100644
--- a/sysdeps/powerpc/fpu/e_hypotf.c
+++ b/sysdeps/powerpc/fpu/e_hypotf.c
@@ -69,22 +69,8 @@ static const float two30  = 1.0737418e09;
 float
 __ieee754_hypotf (float x, float y)
 {
-  x = fabsf (x);
-  y = fabsf (y);
-
   TEST_INF_NAN (x, y);
 
-  if (y > x)
-    {
-      float t = y;
-      y = x;
-      x = t;
-    }
-  if (y == 0.0 || (x / y) > two30)
-    {
-      return x + y;
-    }
-
   return __ieee754_sqrt ((double) x * x + (double) y * y);
 }
 strong_alias (__ieee754_hypotf, __hypotf_finite)