diff options
Diffstat (limited to 'math/w_pow.c')
-rw-r--r-- | math/w_pow.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/math/w_pow.c b/math/w_pow.c index 12c0591d34..ed79dbda05 100644 --- a/math/w_pow.c +++ b/math/w_pow.c @@ -29,13 +29,7 @@ __pow (double x, double y) { if (_LIB_VERSION != _IEEE_) { - if (isnan (x)) - { - if (y == 0.0) - /* pow(NaN,0.0) */ - return __kernel_standard (x, y, 42); - } - else if (isfinite (x) && isfinite (y)) + if (isfinite (x) && isfinite (y)) { if (isnan (z)) /* pow neg**non-int */ @@ -55,19 +49,11 @@ __pow (double x, double y) } } } - else if (__builtin_expect (z == 0.0, 0) && isfinite (x) && isfinite (y) + else if (__builtin_expect (z == 0.0, 0) + && isfinite (x) && x != 0 && isfinite (y) && _LIB_VERSION != _IEEE_) - { - if (x == 0.0) - { - if (y == 0.0) - /* pow(0.0,0.0) */ - return __kernel_standard (x, y, 20); - } - else - /* pow underflow */ - return __kernel_standard (x, y, 22); - } + /* pow underflow */ + return __kernel_standard (x, y, 22); return z; } |