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_exp10l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'math/w_exp10l.c') diff --git a/math/w_exp10l.c b/math/w_exp10l.c index 10f3f81fe0..19facddee6 100644 --- a/math/w_exp10l.c +++ b/math/w_exp10l.c @@ -28,7 +28,7 @@ long double __exp10l (long double x) { long double z = __ieee754_exp10l (x); - if (__builtin_expect (!__finitel (z), 0) + if (__builtin_expect (!__finitel (z) || z == 0, 0) && __finitel (x) && _LIB_VERSION != _IEEE_) /* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */ return __kernel_standard_l (x, x, 246 + !!__signbitl (x)); -- cgit v1.2.3