From 2460d3aa21f04cdf28497683bd3e29183189f779 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 21 Mar 2012 12:14:57 +0000 Subject: Fix pow of zero and infinity to large powers. --- sysdeps/ieee754/dbl-64/e_pow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/ieee754/dbl-64/e_pow.c') 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; -- cgit v1.1