diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-21 12:14:57 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-21 12:16:00 +0000 |
commit | 2460d3aa21f04cdf28497683bd3e29183189f779 (patch) | |
tree | d01d4f4002b56099e0f8959e39aa5eee7dc1db10 /sysdeps/ieee754 | |
parent | eb96ffb07d0b1b23ecfaf9520d6757c7dbea0bd1 (diff) | |
download | glibc-2460d3aa21f04cdf28497683bd3e29183189f779.zip glibc-2460d3aa21f04cdf28497683bd3e29183189f779.tar.gz glibc-2460d3aa21f04cdf28497683bd3e29183189f779.tar.bz2 |
Fix pow of zero and infinity to large powers.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_pow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c index f936a72..26ffaad 100644 --- a/sysdeps/ieee754/dbl-64/e_pow.c +++ b/sysdeps/ieee754/dbl-64/e_pow.c @@ -111,7 +111,7 @@ __ieee754_pow(double x, double y) { if (((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] != 0) || (v.i[HIGH_HALF] & 0x7fffffff) > 0x7ff00000) return y; - if (ABS(y) > 1.0e20) return (y>0)?0:INF.x; + if (ABS(y) > 1.0e20) return (y>0)?0:1.0/ABS(x); k = checkint(y); if (k == -1) return y < 0 ? 1.0/x : x; |