summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32/e_jnf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_jnf.c')
-rw-r--r--sysdeps/ieee754/flt-32/e_jnf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index 4e634778d3..cd15ed7d4b 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -16,7 +16,9 @@
#include <errno.h>
#include <float.h>
#include <math.h>
+#include <math-narrow-eval.h>
#include <math_private.h>
+#include <math-underflow.h>
static const float
two = 2.0000000000e+00, /* 0x40000000 */
@@ -186,7 +188,7 @@ __ieee754_ynf(int n, float x)
float ret;
{
int32_t i,hx,ix;
- u_int32_t ib;
+ uint32_t ib;
int32_t sign;
float a, b, temp;
@@ -194,15 +196,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);