From 2a77a467b273c1a72fa204a8fcc6d22e6e20bb1c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 29 Nov 2013 16:32:49 +0000 Subject: Fix exp10 errno setting on underflow (bug 6787). --- math/w_exp10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'math/w_exp10.c') diff --git a/math/w_exp10.c b/math/w_exp10.c index 3db012d1f1..17823f57ef 100644 --- a/math/w_exp10.c +++ b/math/w_exp10.c @@ -28,7 +28,7 @@ double __exp10 (double x) { double z = __ieee754_exp10 (x); - if (__builtin_expect (!__finite (z), 0) + if (__builtin_expect (!__finite (z) || z == 0, 0) && __finite (x) && _LIB_VERSION != _IEEE_) /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */ return __kernel_standard (x, x, 46 + !!__signbit (x)); -- cgit 1.4.1