aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/e_j1f.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_jnf.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index e24024f..f359a3d 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -71,8 +71,10 @@ __ieee754_j1f(float x)
}
if(__builtin_expect(ix<0x32000000, 0)) { /* |x|<2**-27 */
if(huge+x>one) { /* inexact if x!=0 necessary */
- float ret = (float) 0.5 * x;
+ float ret = math_narrow_eval ((float) 0.5 * x);
math_check_force_underflow (ret);
+ if (ret == 0 && x != 0)
+ __set_errno (ERANGE);
return ret;
}
}
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index d18922a..4e63477 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -167,9 +167,13 @@ __ieee754_jnf(int n, float x)
}
}
if(sgn==1) ret = -b; else ret = b;
+ ret = math_narrow_eval (ret);
}
if (ret == 0)
- ret = __copysignf (FLT_MIN, ret) * FLT_MIN;
+ {
+ ret = math_narrow_eval (__copysignf (FLT_MIN, ret) * FLT_MIN);
+ __set_errno (ERANGE);
+ }
else
math_check_force_underflow (ret);
return ret;