diff options
-rw-r--r-- | lib/msun/src/e_hypot.c | 2 | ||||
-rw-r--r-- | lib/msun/src/e_hypotf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/msun/src/e_hypot.c b/lib/msun/src/e_hypot.c index 932b5db..8f1cd10 100644 --- a/lib/msun/src/e_hypot.c +++ b/lib/msun/src/e_hypot.c @@ -68,7 +68,7 @@ __ieee754_hypot(double x, double y) if(ha >= 0x7ff00000) { /* Inf or NaN */ u_int32_t low; /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabs(x+0.0)+fabs(y+0.0); + w = fabs(x+0.0)-fabs(y+0.0); GET_LOW_WORD(low,a); if(((ha&0xfffff)|low)==0) w = a; GET_LOW_WORD(low,b); diff --git a/lib/msun/src/e_hypotf.c b/lib/msun/src/e_hypotf.c index b760cc6..c70668e 100644 --- a/lib/msun/src/e_hypotf.c +++ b/lib/msun/src/e_hypotf.c @@ -37,7 +37,7 @@ __ieee754_hypotf(float x, float y) if(ha > 0x58800000) { /* a>2**50 */ if(ha >= 0x7f800000) { /* Inf or NaN */ /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabsf(x+0.0F)+fabsf(y+0.0F); + w = fabsf(x+0.0F)-fabsf(y+0.0F); if(ha == 0x7f800000) w = a; if(hb == 0x7f800000) w = b; return w; |