diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_jn.c | 10 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_jnf.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c index 3ac91df2b0..a244df0e0a 100644 --- a/sysdeps/ieee754/dbl-64/e_jn.c +++ b/sysdeps/ieee754/dbl-64/e_jn.c @@ -268,11 +268,6 @@ __ieee754_yn (int n, double x) /* if Y(n,NaN) is NaN */ if (__glibc_unlikely ((ix | ((uint32_t) (lx | -lx)) >> 31) > 0x7ff00000)) return x + x; - if (__glibc_unlikely ((ix | lx) == 0)) - return -HUGE_VAL + x; - /* -inf and overflow exception. */; - if (__glibc_unlikely (hx < 0)) - return zero / (zero * x); sign = 1; if (n < 0) { @@ -281,6 +276,11 @@ __ieee754_yn (int n, double x) } if (n == 0) return (__ieee754_y0 (x)); + if (__glibc_unlikely ((ix | lx) == 0)) + return -sign / zero; + /* -inf and overflow exception. */; + if (__glibc_unlikely (hx < 0)) + return zero / (zero * x); { SET_RESTORE_ROUND (FE_TONEAREST); if (n == 1) diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c index 82b9ba3300..4b78ecea6c 100644 --- a/sysdeps/ieee754/flt-32/e_jnf.c +++ b/sysdeps/ieee754/flt-32/e_jnf.c @@ -194,15 +194,15 @@ __ieee754_ynf(int n, float x) ix = 0x7fffffff&hx; /* if Y(n,NaN) is NaN */ if(__builtin_expect(ix>0x7f800000, 0)) return x+x; - if(__builtin_expect(ix==0, 0)) - return -HUGE_VALF+x; /* -inf and overflow exception. */ - if(__builtin_expect(hx<0, 0)) return zero/(zero*x); sign = 1; if(n<0){ n = -n; sign = 1 - ((n&1)<<1); } if(n==0) return(__ieee754_y0f(x)); + if(__builtin_expect(ix==0, 0)) + return -sign/zero; + if(__builtin_expect(hx<0, 0)) return zero/(zero*x); SET_RESTORE_ROUNDF (FE_TONEAREST); if(n==1) { ret = sign*__ieee754_y1f(x); |