diff options
-rw-r--r-- | math/powf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/math/powf.c b/math/powf.c index 385719b..1149842 100644 --- a/math/powf.c +++ b/math/powf.c @@ -204,8 +204,11 @@ powf (float x, float y) if (WANT_ROUNDING && WANT_ERRNO && ylogx > 0x1.fffffffa3aae2p+6 * POWF_SCALE) /* |x^y| > 0x1.fffffep127, check if we round away from 0. */ - if ((!sign_bias && opt_barrier_float (-ylogx) != -128 * POWF_SCALE) - || (sign_bias && -opt_barrier_float (ylogx) != -128 * POWF_SCALE)) + if ((!sign_bias + && eval_as_float (1.0f + opt_barrier_float (0x1p-25f)) != 1.0f) + || (sign_bias + && eval_as_float (-1.0f - opt_barrier_float (0x1p-25f)) + != -1.0f)) return __math_oflowf (sign_bias); if (ylogx <= -150.0 * POWF_SCALE) return __math_uflowf (sign_bias); |