From f29fea00b5bc72d4b8abccba2bb1e312684d1fce Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 15 Aug 2013 10:08:45 +0000 Subject: math: fix pow(0,-inf) to raise divbyzero flag --- src/math/pow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/math/pow.c') diff --git a/src/math/pow.c b/src/math/pow.c index f257814e..ac3abc0f 100644 --- a/src/math/pow.c +++ b/src/math/pow.c @@ -143,7 +143,7 @@ double pow(double x, double y) return 1.0; else if (ix >= 0x3ff00000) /* (|x|>1)**+-inf = inf,0 */ return hy >= 0 ? y : 0.0; - else /* (|x|<1)**+-inf = 0,inf */ + else if ((ix|lx) != 0) /* (|x|<1)**+-inf = 0,inf if x!=0 */ return hy >= 0 ? 0.0 : -y; } if (iy == 0x3ff00000) /* y is +-1 */ -- cgit v1.2.1